CVE Catalog

CVE-2026-107315

MediumCVSS 5.3
Published: Translated: NVD NIST

Summary

The PostgreSQL JDBC Driver (pgjdbc) versions 42.7.4 through 42.7.13 pads a value shorter than its declared length with bytes left in its send buffer instead of zeros, and the server stores those bytes as part of the value. These bytes are messages the driver sent earlier on the same connection: SQL text and parameter values of recent statements, which on a pooled connection can come from other requests. Each padded value can carry up to 8192 bytes of this traffic, or 16320 bytes with GSS encryption. The padding occurs when an application declares a length larger than the data it supplies through certain APIs. An attacker who can make the application store such a value and read it back can collect earlier traffic. Applications whose declared lengths always match their data are not affected. Versions 42.7.3 and earlier pad with zeros.

Risk Assessment

Buffer leakage can expose sensitive information such as SQL query text and parameters, potentially including credentials or personal data. In pooled connection environments, the risk increases as data may originate from other requests.

Recommendation

Update the pgjdbc library to a patched version (e.g., 42.7.14 or later if available). Ensure that declared lengths always match the actual data supplied.

Other vulnerabilities in pgjdbc

See all
Original NVD description (English source)

pgjdbc, the PostgreSQL JDBC Driver, versions 42.7.4 through 42.7.13 pads a value that is shorter than its declared length with bytes left in its send buffer instead of zeros, and the server stores those bytes as part of the value. The bytes are messages the driver sent earlier on the same connection: SQL text and parameter values of recent statements, which on a pooled connection can come from other requests. Each padded value can carry up to 8192 bytes of this traffic, or 16320 bytes on a connection with GSS encryption. The padding happens when an application declares a length larger than the data it supplies, through PreparedStatement.setObject with a ByteStreamWriter, CopyIn.writeToCopy, PGCopyOutputStream.write, LargeObject.write, or Blob.setBytes. The driver accepts these calls without an error. An attacker who can make the application store such a value and read it back can collect earlier traffic. Applications whose declared lengths always match their data are not affected. Versions 42.7.3 and earlier pad with zeros.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS