CVE-2025-49146
pgjdbc Client Allows Fallback to Insecure Authentication Despite channelBinding=require Configuration
Description
Impact
When the PostgreSQL JDBC driver is configured with channel binding set to required (default value is prefer), the driver would incorrectly allow connections to proceed with authentication methods that do not support channel binding (such as password, MD5, GSS, or SSPI authentication). This could allow a man-in-the-middle attacker to intercept connections that users believed were protected by channel binding requirements.
Patches
TBD
Workarounds
Configure sslMode=verify-full to prevent MITM attacks.
References
- https://www.postgresql.org/docs/current/sasl-authentication.html#SASL-SCRAM-SHA-256
- https://datatracker.ietf.org/doc/html/rfc7677
- https://datatracker.ietf.org/doc/html/rfc5802
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.postgresql » postgresql | >= 42.7.4, < 42.7.7 | 42.7.7 |
Blast radius
30% of the dependent artifacts (641) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 8,978 |
| 2 hops | 19,065 |
| 3 hops | 9,654 |
| 4 hops | 3,231 |
| 5 hops | 1,863 |
| 6 hops | 501 |
Most used dependents
- org.openmrs.web » openmrs-web521 usages
- io.quarkus » quarkus-jdbc-postgresql235 usages
- net.postgis » postgis-jdbc214 usages
- org.geoserver.web » gs-web-core194 usages
- io.zonky.test » embedded-postgres151 usages
- org.geotools.jdbc » gt-jdbc-postgis134 usages
- org.openmrs.module » calculation-api115 usages
- org.openmrs.module » webservices.rest-omod103 usages
- org.ossreviewtoolkit » model102 usages
- org.openurp.starter » openurp-starter-web92 usages
- org.tpolecat » doobie-postgres91 usages
- org.finos.legend.engine » legend-engine-xt-relationalStore-executionPlan89 usages
- org.openurp.base » openurp-base-tag85 usages
- org.beangle.ems » beangle-ems-app84 usages
- io.debezium » debezium-connector-postgres79 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-hq9p-pm7w-8p54
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2025-49146
- Webhttps://github.com/pgjdbc/pgjdbc/commit/9217ed16cb2918ab1b6b9258ae97e6ede244d8a0
- Webhttps://datatracker.ietf.org/doc/html/rfc5802
- Webhttps://datatracker.ietf.org/doc/html/rfc7677
- Packagehttps://github.com/pgjdbc/pgjdbc
- Webhttps://www.postgresql.org/docs/current/sasl-authentication.html#SASL-SCRAM-SHA-256
