CVE-2026-134846

Information Exposure
Affects
PostgreSQL JDBC Driver
in
PostgreSQL JDBC Driver
No items found.
Versions
>=42.2.15 <42.7.15

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

The PostgreSQL JDBC Driver (pgJDBC) is the open-source JDBC driver that lets Java programs connect to a PostgreSQL database using standard, database-independent Java code. It is a pure Java (Type 4) driver that speaks the PostgreSQL native network protocol. It is published to Maven Central as org.postgresql:postgresql, and Spring Boot 2.7 manages its 42.3 line.

An information exposure vulnerability (CVE-2026-134846) has been identified in the GSS encryption layer of the PostgreSQL JDBC Driver, which allows attackers on the network path to read later SQL statements and parameter values once the server has sent one integrity-only packet, because the driver then stops encrypting what it sends. An attacker on the network path can also make the driver accept an earlier server reply as the answer to the current query.

Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.

This issue affects versions 42.2.15 through 42.7.14 of the PostgreSQL JDBC Driver.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the org.postgresql:postgresql package in versions 42.2.15 through 42.7.14 of the PostgreSQL JDBC Driver. It affects only connections that start GSS encryption, which requires gssEncMode=prefer or gssEncMode=require and a server that accepts GSS encryption. Since 42.2.18 the default gssEncMode is allow, which does not start GSS encryption.

When GSS encryption starts, PGStream.setSecContext() creates a single MessageProp and hands the same object to both the input stream and the output stream:

public void setSecContext(GSSContext secContext) {
  MessageProp messageProp =  new MessageProp(0, true);
  pgInput = new VisibleBufferedInputStream(new GSSInputStream(pgInput.getWrapped(), secContext, messageProp ), 8192);
  pgOutput = new GSSOutputStream(pgOutput, secContext, messageProp, 16384);
  gssEncrypted = true;
}

GSSInputStream reads each length-prefixed token from the server and unwraps it with that shared object:

byte[] unencrypted = gssContext.unwrap(encryptedBuffer, 0, encryptedLength, messageProp);

GSSContext.unwrap() throws only when a token fails its integrity check. A valid token that is a duplicate, an old token, out of sequence, or after a gap is still returned as plaintext, and the condition is only reported through the MessageProp (isDuplicateToken(), isOldToken(), isUnseqToken(), isGapToken()). The driver never reads these flags, and GssEncAction requests only mutual authentication, confidentiality and integrity, not replay or sequence detection. An attacker on the network path can therefore drop a server reply and deliver an earlier sealed packet from the same connection, and the driver passes it to the protocol parser as the answer to the current query.

The shared MessageProp causes the second problem. The JDK Kerberos mechanism writes the flags of an incoming token into the MessageProp passed to unwrap(). When the server sends a token that is integrity-protected but not sealed, the privacy flag on the shared object is cleared, and GSSOutputStream.flush() then wraps every later outgoing packet with it:

byte[] token = gssContext.wrap(buffer, 0, index, messageProp);

From that point the driver sends signed but unencrypted packets, so later SQL statements and parameter values can be read by anyone on the network path. Only a party holding the session key, such as the server, can produce such an integrity-only token.

Mitigation

The PostgreSQL JDBC Driver's security policy ships security fixes by default only for the latest 42.x release line and for 42.2.x, and for other versions only upon request. Upstream has made no 42.3.x release since 42.3.10 (March 2024), so no 42.3.x release is available to address this issue. For more information, see here.

Users of the affected components should apply one of the following mitigations:

  • Upgrade affected applications to a currently supported release of the PostgreSQL JDBC Driver that contains the fix.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

Credits

  • Anthropic OSS Scanner (finder)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-134846
PROJECT Affected
PostgreSQL JDBC Driver
Versions Affected
>=42.2.15 <42.7.15
NES Versions Affected
Published date
November 23, 2026
≈ Fix date
December 4, 2026
Category
Information Exposure
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for PostgreSQL JDBC Driver
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.