HighGHSA-j92g-9f8w-j867BIT-postgresql-jdbc-driver-2026-54291CVE-2026-54291

PostgreSQL JDBC Driver: Silent channel-binding authentication downgrade via unsupported certificate algorithms

Published 21 Jul 2026 · Updated 10 Sept 2026

Is your project on an affected org.postgresql:postgresql?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Java apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
>=42.7.4 <42.7.12
Fixed in
42.7.12
Update to the fixed version for your release line, for example:mvn versions:use-dep-version -Dincludes=org.postgresql:postgresql -DdepVersion=42.7.12 -DforceVersion=true

Details

Impact

channelBinding=require connections can be silently downgraded from SCRAM-SHA-256-PLUS (with channel binding) to plain SCRAM-SHA-256 (without it), losing the man-in-the-middle protection the setting is meant to guarantee. An attacker who can intercept the TLS connection triggers the downgrade with a certificate whose signature algorithm has no tls-server-end-point channel-binding hash. Examples are Ed25519, Ed448, and post-quantum algorithms.

Two issues combine in releases 42.7.4 through 42.7.11:

1. The bundled com.ongres.scram:scram-client (3.1 or 3.2) returns an empty byte array instead of failing when it cannot derive the binding hash for such a certificate. This is the library issue tracked as GHSA-p9jg-fcr6-3mhf. 2. pgJDBC does not enforce channelBinding=require where it matters. ScramAuthenticator checks only that the server *advertised* a -PLUS mechanism; it neither rejects the empty binding nor checks that the *negotiated* mechanism uses channel binding. The connection therefore downgrades silently, and would do so even against a fixed scram-client, because the missing enforcement is in pgJDBC's own code.

Only connections that set channelBinding=require are affected. Under the default prefer policy, and under allow or disable, falling back to plain SCRAM is the documented behaviour. Releases before 42.7.4 are unaffected, because they do not support channel binding.

Patches

Fixed in pgJDBC 42.7.12. pgJDBC now enforces channel binding in its own code, independently of the scram-client version:

  • Under channelBinding=require, it fails the connection when no channel-binding data can be extracted from the server certificate, instead of passing an empty value to the SCRAM client. The error names the certificate signature algorithm.
  • After negotiation, it requires the selected mechanism to use channel binding (a -PLUS mechanism) whenever channelBinding=require is set, regardless of how negotiation resolved.

Upgrade to 42.7.12 or later.

Workarounds

No pgJDBC setting restores channel-binding enforcement on an affected release; upgrading is the fix.

If you cannot upgrade immediately, verify the server certificate at the TLS layer so that a man-in-the-middle cannot present a substitute certificate. Set sslmode=verify-full with a truststore that contains only your server's CA. This defence is independent of channel binding and blocks the same attacker. Connections that rely on channelBinding=require in place of certificate verification have no equivalent workaround and should upgrade.

References

  • GHSA-p9jg-fcr6-3mhf — the related com.ongres.scram:scram-client issue (root cause of the empty channel-binding value).
  • scram-client 3.3 release (library fix): https://github.com/ongres/scram/releases/tag/3.3
  • pgJDBC fix in 42.7.12: commit

Is GHSA-j92g-9f8w-j867 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected org.postgresql:postgresql, and gives you the command that fixes it.

More advisories for org.postgresql:postgresql

  • HighCVE-2026-42198pgjdbc: Unbounded PBKDF2 iterations in SCRAM authentication allows CPU exhaustion DoS · 5 May 2026
  • HighCVE-2025-49146pgjdbc Client Allows Fallback to Insecure Authentication Despite channelBinding=require Configuration · 11 Jun 2025
  • CriticalCVE-2024-1597org.postgresql:postgresql vulnerable to SQL Injection via line comment generation · 21 Feb 2024
  • MediumCVE-2022-41946TemporaryFolder on unix-like systems does not limit access to created files · 23 Nov 2022
  • HighCVE-2022-31197PostgreSQL JDBC Driver SQL Injection in ResultSet.refreshRow() with malicious column names · 6 Aug 2022
  • HighCVE-2012-1618Unescaped parameters in the PostgreSQL JDBC driver · 17 May 2022
All 11 advisories for org.postgresql:postgresql

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.