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·5 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

•42 minutes ago•GHSA-2F96-G7MH-G2HX
8.8

GHSA-2F96-G7MH-G2HX: Command Injection Bypass in GitPython Options Validation

GitPython prior to version 3.1.51 contains a command injection vulnerability due to flaws in its option validation routine. By exploiting Git's native argument parser behavior, specifically long-option abbreviation resolution and short-option clustering, attackers can bypass the check_unsafe_options blocklist to execute arbitrary OS commands.

Amit Schendel
Amit Schendel
1 views•5 min read
•about 2 hours ago•CVE-2026-59879
8.7

CVE-2026-59879: Infinite Loop and Integer Overflow in Immutable.js List Sizing

CVE-2026-59879 describes a critical integer overflow vulnerability in the Immutable.js library when handling indices near 32-bit boundaries. An attacker can leverage this flaw to cause a denial of service via CPU thread lockup or process crashes, as well as data corruption through silent size truncation.

Amit Schendel
Amit Schendel
5 views•8 min read
•about 4 hours ago•CVE-2026-56170
7.5

CVE-2026-56170: Remote Denial of Service via Resource Exhaustion in ASP.NET Core

CVE-2026-56170 is a high-severity Remote Denial of Service (DoS) vulnerability in Microsoft's ASP.NET Core framework. The vulnerability spans three separate resource-management vectors within the ASP.NET Core ecosystem, including SignalR Stateful Reconnect allocations, JSON Patch Type Confusion leading to stack exhaustion, and Kestrel HTTP/2 synchronization issues. An unauthenticated remote attacker can exploit these issues to cause process-terminating exceptions, rendering applications unavailable.

Amit Schendel
Amit Schendel
5 views•7 min read
•about 5 hours ago•GHSA-8WHX-365G-H9VV
2.3

GHSA-8whx-365g-h9vv: HTML5 Named Whitespace Bypass in Loofah allowed_uri? Validation

The Loofah Ruby gem version 2.25.0 and 2.25.1 contains an incomplete validation vulnerability in its public string-level utility Loofah::HTML5::Scrub.allowed_uri?. This helper fails to detect 'javascript:' URIs that are split by HTML5 named whitespace character references such as &Tab; and &NewLine;. Applications manually invoking this utility to validate links are vulnerable to stored Cross-Site Scripting (XSS), as browsers parse and remove these entities during rendering.

Alon Barad
Alon Barad
4 views•7 min read
•about 6 hours ago•CVE-2026-50525
7.5

CVE-2026-50525: Denial of Service Vulnerability in Microsoft .NET XML Cryptography Stack

CVE-2026-50525 is a high-severity Denial of Service (DoS) vulnerability in the Microsoft .NET XML Cryptography stack. The vulnerability resides in the `System.Security.Cryptography.Xml` library, specifically within the `EncryptedXml` processing engine. Unauthenticated remote attackers can exploit this flaw by sending specifically crafted XML documents containing nested or recursive structures, or utilizing resource-intensive transforms. Processing such payloads leads to infinite CPU loops, stack exhaustion, or memory starvation, resulting in application termination.

Amit Schendel
Amit Schendel
5 views•6 min read
•about 7 hours ago•CVE-2026-50659
6.5

CVE-2026-50659: SMTP Command and Header Injection in .NET System.Net.Mail

An improper encoding and escaping vulnerability in the .NET SMTP client component allows network-based attackers to perform SMTP command smuggling and email spoofing by injecting control characters into email fields.

Alon Barad
Alon Barad
5 views•8 min read