/

CVE-2026-134845

Severity:

HIGH RISK

(7.4)

TLS Enforcement Failure (CWE-319) in pgjdbc Driver

CVE-2026-134845

Awaiting Analysis

Vulnerability type

Category:

TLS Enforcement Failure

CWE:

CWE-295, CWE-319

Impact:

Exposure and tampering of database traffic

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

pgjdbc may fail to enforce TLS when connection settings are supplied through certain properties, service definitions, or URL-setting sequences. If a connection falls back to plaintext or otherwise lacks the requested TLS protection, an attacker on the network path may read or modify database traffic.

Affected context

The issue affects pgjdbc versions 9.4.1208 through 42.7.14 when connection configuration reaches one of the affected parsing or precedence paths. Examples include using an ssl value without an explicit sslmode, supplying a service through Properties whose pg_service.conf entry specifies sslmode, or setting connection options before calling BaseDataSource.setUrl(). The resulting connection may not apply the intended TLS settings.

Exploit preconditions

  • Attack surface: Network traffic between a pgjdbc client and a PostgreSQL server
  • Required access: An attacker must be positioned to observe or interfere with that traffic; access to the application's configuration may also be needed to establish an affected settings path
  • Trigger point: The client creates a connection using one of the affected combinations of properties, service settings, or URL and data-source options
  • Why exploitation is possible: TLS settings can be ignored, weakened, or retained unexpectedly, allowing a connection to proceed without the protection the configuration intended

Why this happens

The driver does not consistently resolve and enforce TLS-related settings across connection configuration sources. In affected cases, an ssl value can map to a mode that permits fallback, a service setting can be lost, or previously set data-source options can persist when the URL is changed. This is primarily associated with CWE-319: Cleartext Transmission of Sensitive Information when traffic is sent without TLS; the failure to apply expected security settings is also related to CWE-295: Improper Certificate Validation.

Potential impact

  • An attacker on the network path may read database credentials or query data if the connection uses plaintext.
  • Database requests or responses could be modified in transit.
  • Sensitive information could be exposed, potentially leading to unauthorized access or data integrity issues.

General mitigation guidance

Defensive patterns include making TLS mandatory by default and using explicit, unambiguous connection settings rather than relying on aliases or fallback behavior. Use certificate and hostname verification where appropriate, and reject configurations that do not satisfy the required transport security policy. Ensure settings from URLs, properties, service definitions, and data-source APIs are merged with documented, consistent precedence; reduce reliance on externally mutable configuration and limit database account privileges.

How teams detect issues like this

  • Review connection setup code for implicit TLS defaults, fallback modes, and conflicting settings from URLs, properties, service files, or data-source methods.
  • Use static analysis and code review checks to flag connection configurations that do not explicitly meet the application's TLS policy.
  • Test representative configuration combinations and verify the negotiated transport and certificate checks at runtime.
  • Enforce policies that reject database connections unless required TLS protections are active; monitor connection metadata for unexpected plaintext sessions.

Sources

SourceLink
github.comgithub.com/pgjdbc/pgjdbc/security/advisories/GHSA-3mrw-838h-x9j9

Frequently asked

questions

Exploitation requires an attacker who can observe or interfere with the client-to-server network path, and an affected connection configuration that does not enforce the intended TLS protection.

Not necessarily. A network-path attacker may be able to observe or alter traffic without those privileges, but the affected configuration must be used for the connection.

Require TLS explicitly, validate server certificates and hostnames where applicable, and reject connections that do not meet the required policy.

Test configuration precedence across all supported connection inputs, avoid ambiguous defaults and fallback behavior, and enforce transport-security requirements through code review and runtime policy.

Find out what's already
exploitable in your codebase.