CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-54291

CVE-2026-54291: Silent Channel-Binding Authentication Downgrade in PostgreSQL JDBC Driver (pgjdbc)

Alon Barad
Alon Barad
Software Engineer

Jul 21, 2026·7 min read·183 visits

Executive Summary (TL;DR)

pgjdbc versions 42.7.4 to 42.7.11 silently downgrade connections configured with `channelBinding=require` to plain, non-channel-bound SCRAM-SHA-256 when a server certificate with an unsupported signature algorithm (like Ed25519) is presented, bypassing Man-in-the-Middle protections.

A critical security bypass and algorithm downgrade vulnerability in the PostgreSQL JDBC Driver (pgjdbc) allows Man-in-the-Middle (MITM) attackers to silently bypass channel binding requirements. When configured with `channelBinding=require`, the driver fails to assert that the negotiated SCRAM mechanism utilizes channel binding, allowing downgrade to plain SCRAM-SHA-256 when encountering unsupported server certificate signature algorithms (such as Ed25519 or Ed448).

Vulnerability Overview

The PostgreSQL JDBC Driver (pgjdbc) is the official open-source Java database connectivity driver for PostgreSQL databases. To protect database connections from Adversary-in-the-Middle (AiTM) attacks, administrators configure the driver with the channelBinding=require connection property. Channel binding provides strong authentication protection by cryptographically binding the outer Transport Layer Security (TLS) tunnel to the inner Simple Authentication and Security Layer (SASL) protocol exchange.

The industry standard mechanism used for PostgreSQL channel binding is tls-server-end-point, specified in RFC 5929. This mechanism functions by taking a cryptographic hash of the server's TLS certificate and incorporating it directly into the SCRAM authentication exchange. If an attacker attempts to intercept the connection by proxying the TLS session with their own certificate, the computed certificate hashes will mismatch, and the authentication flow will fail.

In pgjdbc versions 42.7.4 through 42.7.11, this security guarantee is undermined. When encountering signature algorithms unsupported by the underlying cryptographic libraries for hashing under RFC 5929, the driver silently fails open. The client reverts to standard SCRAM-SHA-256 authentication without channel binding, leaving the connection exposed to interception and credential relay attacks.

Root Cause Analysis

The root cause of this vulnerability lies in the interaction between the pgjdbc driver's authentication coordinator, org.postgresql.core.v3.ScramAuthenticator, and the third-party dependency com.ongres.scram:scram-client.

During a connection attempt where channel binding is required, pgjdbc requests the channel-binding hash from the certificate via TlsServerEndpoint.getChannelBindingData(cert). If the target PostgreSQL database server employs a modern certificate signature algorithm, such as Ed25519 or Ed448, the standard Java Cryptography Architecture (JCA) cannot determine an appropriate hash algorithm under RFC 5929 rules. RFC 5929 dictates mapping specific signature algorithms to their corresponding one-way hash functions, but does not define mappings for these newer Edwards-curve signatures.

Instead of raising a cryptographic exception or aborting the handshake, the scram-client library returns an empty byte array (byte[0]). The vulnerable versions of ScramAuthenticator accept this empty array without validation. The underlying SCRAM state machine interprets the empty byte array as a signal that channel-binding data is unavailable for the current context, and dynamically falls back to standard SCRAM-SHA-256 negotiation.

Because the driver fails to verify that the active, negotiated mechanism is actually the channel-bound variant (SCRAM-SHA-256-PLUS), it permits the connection to establish. This sequence bypasses the explicit channelBinding=require policy configuration, leaving the connection vulnerable to a silent downgrade attack.

Architecture & Downgrade Mechanics

To visualize the downgrade process, the following diagram illustrates how an intercepting adversary can leverage an unsupported certificate to strip the channel-binding requirement and complete the authentication process without triggering client-side warnings.

Under normal circumstances, if the attacker attempts to intercept the TLS session, the client computes the hash of the attacker's certificate and sends it to the server. The server compares this hash against its own certificate and aborts. By utilizing an Ed25519 certificate, the attacker exploits the client's failure-handling mechanism, prompting the client to submit no channel binding data at all, which the server permits because the client has technically requested the standard non-PLUS authentication mechanism.

Code Analysis

The vulnerability was resolved in commit 77df98e4e66c12936ded3478a0954f6f580bad99 by introducing two distinct validation steps within org.postgresql.core.v3.ScramAuthenticator.java. These changes prevent silent downgrade by implementing explicit pre-negotiation and post-negotiation assertions.

The first correction applies immediately after the SASL client initialization. The driver now validates the negotiated mechanism to confirm that a -PLUS variant is in use:

// Code from pgjdbc/src/main/java/org/postgresql/core/v3/ScramAuthenticator.java
 
      // channelBinding=require must never silently downgrade: regardless of how negotiation
      // resolved, the selected mechanism must actually use channel binding (a -PLUS mechanism).
      if (channelBinding == ChannelBinding.REQUIRE && !client.getScramMechanism().isPlus()) {
        throw new PSQLException(
            GT.tr("Channel Binding is required, but the negotiated SCRAM mechanism \"{0}\" "
                + "does not use channel binding.", client.getScramMechanism().getName()),
            PSQLState.CONNECTION_REJECTED);
      }

This check acts as a fail-safe. If negotiations resolve to any standard mechanism that lacks cryptographic channel binding, the client throws a PSQLException and terminates the connection attempt.

The second correction is implemented within the certificate processing phase of getChannelBindingData. It prevents the silent consumption of empty byte arrays:

// Code from pgjdbc/src/main/java/org/postgresql/core/v3/ScramAuthenticator.java
 
            byte[] cbindData = TlsServerEndpoint.getChannelBindingData(cert);
            if (cbindData.length > 0) {
              return cbindData;
            }
            // An empty result means no channel binding hash could be derived from the
            // certificate signature algorithm: for example Ed25519 has no associated hash
            // under RFC 5929 tls-server-end-point. Under REQUIRE this must fail rather than
            // silently downgrade to a non-PLUS mechanism.
            if (channelBinding == ChannelBinding.REQUIRE) {
              throw new PSQLException(
                  GT.tr("Channel Binding is required, but the server certificate signature "
                      + "algorithm \"{0}\" does not support tls-server-end-point channel "
                      + "binding (RFC 5929). Use a server certificate signed with RSA or ECDSA.",
                      cert.getSigAlgName()),
                  PSQLState.CONNECTION_REJECTED);
            }

This patch ensures that if cbindData is empty under a strict channel-binding policy, the driver stops processing. The driver now throws an exception identifying the incompatible certificate signature algorithm, ensuring the system fails closed.

Exploitation Methodology

To exploit CVE-2026-54291, an attacker must establish an Adversary-in-the-Middle (AiTM) position between the target Java application (using pgjdbc) and the PostgreSQL server. The attack does not require prior authentication credentials.

The attacker intercepts the initial TLS handshake initiated by the client. The attacker presents a spoofed server certificate signed with an algorithm for which tls-server-end-point cannot compute a hash, such as Ed25519. This certificate can be self-signed or signed by a rogue authority, depending on whether the client performs strict hostname and truststore validation.

Upon receiving this certificate, the vulnerable pgjdbc client invokes TlsServerEndpoint.getChannelBindingData(). The method returns an empty array. The driver, bypassing checks, falls back to the non-PLUS SCRAM authentication flow. The attacker can then transparently proxy the authentication exchange, successfully intercepting or relaying the SCRAM-SHA-256 exchange to the authentic backend server, establishing an authorized session under the victim's identity.

Impact Assessment

The potential impact of this vulnerability is significant, as it completely negates the protections provided by the channelBinding=require parameter. If exploited, an attacker can bypass mutual authentication protections, perform unauthorized actions on the database, read or alter sensitive records, and potentially gain administrative credentials through relay mechanisms.

Despite the severity, the overall attack complexity remains high. An attacker must have the capability to intercept network traffic on the path between the database client and server, or poison the local network routing. Additionally, if the client implements strict certificate authority verification, the attacker must also possess a valid, trusted certificate utilizing the target unsupported signature algorithm, or find a way to bypass the driver's trust checks.

According to NVD, the CVSS v3.1 score is evaluated at 5.9 (Medium), reflecting the high attack complexity. However, GitHub's CVSS v4.0 assessment assigns a score of 8.2 (High), recognizing that when the required network conditions are met, the integrity of the connection's authentication is severely compromised.

Remediation & Hardening Guidance

The primary remediation for this vulnerability is upgrading the PostgreSQL JDBC Driver to version 42.7.12 or higher. This version contains the required code-level verification checks to ensure that the driver fails closed when channel binding cannot be negotiated.

In addition to upgrading pgjdbc, developers and administrators should evaluate their transitive dependencies. Upgrading the underlying com.ongres.scram:scram-client library to version 3.3 or higher is recommended, as newer releases of this library address internal deficiencies related to Edwards-curve certificate hashing.

If upgrading the driver is not immediately feasible, organizations can implement operational workarounds. Ensure that all PostgreSQL database servers are configured with certificates signed using RSA or ECDSA signature schemes, which are fully supported under RFC 5929. Organizations must also restrict network paths between database clients and servers using strictly isolated VPC routing, IPsec, or trusted overlay networks to prevent adversaries from establishing the required middleman posture.

Official Patches

PostgreSQL Global Development GroupPatch commit introducing strict requirements checks on the negotiated SCRAM mechanisms.

Fix Analysis (1)

Technical Appendix

CVSS Score
8.2/ 10
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:L/SA:N
EPSS Probability
0.24%
Top 85% most exploited

Affected Systems

pgjdbc (PostgreSQL JDBC Driver)

Affected Versions Detail

Product
Affected Versions
Fixed Version
pgjdbc
PostgreSQL Global Development Group
>= 42.7.4, < 42.7.1242.7.12
AttributeDetail
CWE IDCWE-757, CWE-636
Attack VectorNetwork
CVSS v4.0 Score8.2 (High)
CVSS v3.1 Score5.9 (Medium)
Exploit StatusProof of Concept / Technical Analysis Available
KEV StatusNot Listed in CISA KEV
Affected Componentsorg.postgresql.core.v3.ScramAuthenticator

MITRE ATT&CK Mapping

T1557Adversary-in-the-Middle
Credential Access
T1557.001LLMNR/NBT-NS Poisoning and SMB Relay
Credential Access
CWE-757
Selection of Less-Secure Algorithm During Negotiation ('Algorithm Downgrade')

The system negotiates a weaker algorithm or security protocol variant than expected, allowing a Man-in-the-Middle attacker to intercept and tamper with the negotiation phase.

Known Exploits & Detection

GitHub Security AdvisoryOfficial advisory containing remediation details and description of the security bypass.

Vulnerability Timeline

Preliminary repository configuration preparations for pgjdbc 42.7.12.
2026-04-28
Fix commit implementing post-negotiation assertions merged into master.
2026-06-29
Vulnerability public disclosure (CVE-2026-54291) published on GHSA.
2026-07-06
NVD record published.
2026-07-06

References & Sources

  • [1]GitHub Security Advisory GHSA-j92g-9f8w-j867
  • [2]Fix Commit in GitHub Repository
  • [3]Ongres SCRAM Release 3.3 Changelog
  • [4]NVD Vulnerability Detail - CVE-2026-54291

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•2 days ago•CVE-2026-107844
5.3

CVE-2026-107844: Path Traversal Vulnerability in Contao ImagesController

A path traversal vulnerability (CWE-22) in Contao CMS allows unauthenticated remote attackers to bypass directory boundary restrictions in ImagesController and access files within the project directory.

Amit Schendel
Amit Schendel
12 views•5 min read
•2 days ago•CVE-2026-107848
3.5

CVE-2026-107848: Cross-Site Request Forgery (CSRF) in Contao Backend Actions via GET Requests

Contao Open Source CMS versions 4.0.0 through 5.3.49 and 5.4.0-RC1 through 5.7.11 contain a Cross-Site Request Forgery (CSRF) vulnerability in backend parameter handling. The `RequestTokenListener` component validates anti-CSRF tokens solely for HTTP POST requests, while GET-based declarative guards run only when an `act` parameter is present in the query string. Consequently, custom backend actions dispatched via alternative parameters such as `key=` can execute without CSRF token verification when triggered by an authenticated user.

Amit Schendel
Amit Schendel
8 views•5 min read
•3 days ago•CVE-2026-107843
5.3

CVE-2026-107843: Unthrottled Activation Email Resend and Account Enumeration in Contao CMS

Contao CMS versions 4.1.0 through 5.3.49 and 5.4.0-RC1 through 5.7.11 fail to validate form submission tokens and enforce rate limiting when processing activation email resend requests via HTTP POST, enabling resource exhaustion and account state enumeration.

Amit Schendel
Amit Schendel
9 views•4 min read
•3 days ago•CVE-2026-107842
5.3

CVE-2026-107842: Information Disclosure via Stale Indexing in Contao Search Module

An information disclosure vulnerability in Contao CMS allows unauthenticated site visitors to view protected page titles, URLs, and text excerpts through search queries when protected page indexing is disabled after previously being enabled.

Amit Schendel
Amit Schendel
10 views•4 min read
•3 days ago•GHSA-G38J-7V97-X298
6.5

GHSA-G38J-7V97-X298: Missing Authorization Check in Vikunja CalDAV Task Relation Creation

In Vikunja prior to version 2.6.0, relation creation via the CalDAV endpoint fails to invoke the TaskRelation.CanCreate authorization check. This missing access control allows an authenticated user to establish unauthorized relationships and perform write operations against any task, provided its unique identifier (UID) is known.

Alon Barad
Alon Barad
12 views•5 min read
•3 days ago•GHSA-3HC7-R24J-RPWC
6.8

GHSA-3hc7-r24j-rpwc: Cross-Project Task Disclosure via Subtask Expansion in Vikunja

A cross-project information disclosure vulnerability in Vikunja allows authenticated users with read access to one project to view private task details from unauthorized projects via subtask expansion parameters.

Alon Barad
Alon Barad
9 views•5 min read