
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2026-134845 is a TLS enforcement flaw in pgjdbc, the PostgreSQL JDBC Driver, that allows network-positioned attackers to intercept and modify database traffic. The vulnerability stems from multiple misconfigurations where TLS is not properly enforced despite settings that request it: SSL values like 1, on, yes, or verify-full result in sslmode=prefer (or no TLS at all in older versions) rather than requiring encryption; service entries specified via Properties have their pg_service.conf sslmode silently ignored; and BaseDataSource.setUrl() retains previously set sslmode, channelBinding, or gssEncMode values. Affected versions span 9.4.1208 through 42.7.14 (Maven artifact org.postgresql:postgresql), and version 42.7.15 resolves the issue. It carries a CVSS v3.1 base score of 7.4 (High) (GitHub Advisory).
The root cause is classified under CWE-295 (Improper Certificate Validation) and CWE-319 (Cleartext Transmission of Sensitive Information). Three distinct code paths contribute to the flaw: (1) when sslmode is absent, SSL shorthand values (1, on, yes, verify-full) resolve to sslmode=prefer from version 42.2.5 onward, or to no TLS at all in versions 9.4.1208–42.2.4; (2) a PostgreSQL service name passed via Properties to getConnection() is silently ignored, discarding the sslmode from the corresponding pg_service.conf entry; and (3) BaseDataSource.setUrl() does not overwrite properties already set, so a prior sslmode, channelBinding, or gssEncMode persists even after a new URL is supplied. A proof-of-concept connection string demonstrating the issue is jdbc:postgresql://db.example.com/app?ssl=on, which causes the driver to use sslmode=prefer, allowing a network attacker to refuse TLS or present an arbitrary certificate (GitHub Advisory).
An unauthenticated attacker positioned on the network path between a Java application and its PostgreSQL server can intercept all database traffic in cleartext, including credentials (for some authentication methods), SQL queries, and query results, and can also modify commands and responses in transit. Both confidentiality and integrity are rated High, while availability is unaffected. The scope of impact is limited to connections using one of the misconfigured SSL settings, but given the breadth of affected versions (spanning over a decade of releases), the potential exposure across enterprise environments is significant (GitHub Advisory).
No public proof-of-concept exploit code or in-the-wild exploitation has been confirmed as of the disclosure date, though the GitHub Advisory includes a PoC connection string illustrating the misconfiguration. The EPSS score is 0.0, and the vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog. Exploitation requires an attacker to be positioned on the network path (man-in-the-middle), making it a High attack complexity scenario that is not automatable (GitHub Advisory).
ssl=on, ssl=yes, ssl=1, or ssl=verify-full without an explicit sslmode parameter.sslmode=prefer, intercept the initial connection handshake and refuse the TLS upgrade. The driver will fall back to an unencrypted connection without alerting the application.ssl=off) from clients that are configured to request SSL; application logs lacking TLS handshake confirmation messages.ssl=on, ssl=yes, ssl=1, or ssl=verify-full without an explicit sslmode=require or sslmode=verify-full parameter; use of pg_service.conf service names passed via Properties rather than the JDBC URL.Upgrade org.postgresql:postgresql (pgjdbc) to version 42.7.15 or later, which is the official fix (GitHub Advisory). As interim mitigations: (1) explicitly set sslmode=require or sslmode=verify-full in JDBC connection URLs rather than relying on the ssl shorthand parameter; (2) pass sslmode directly in the JDBC URL rather than via pg_service.conf service entries in Properties; (3) audit any code using BaseDataSource.setUrl() to ensure TLS-related properties are not inadvertently retained from prior configurations; and (4) implement network segmentation and monitoring to detect unencrypted database connections or anomalous traffic on database network paths.
Fix availability across major Linux distributions and their releases.
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."