Vulnerability · Published Oct 7, 2026 · Assigned by PostgreSQL

CVE-2026-107315pgjdbc pads a value shorter than its declared length with bytes of earlier statements (rather than zeros)

Medium 5.3

In plain English

A medium-severity security flaw in pgjdbc from pgjdbc. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 10% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.3Medium
Exploit odds (30 days)0.2%top 89.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12libpgjavano fix listedDEBIAN-CVE-2026-107315
Debian:13libpgjavano fix listedDEBIAN-CVE-2026-107315
Debian:14libpgjava42.7.14-1DEBIAN-CVE-2026-107315
Ubuntu:22.04:LTSlibpgjavano fix listedUBUNTU-CVE-2026-107315
Ubuntu:24.04:LTSlibpgjavano fix listedUBUNTU-CVE-2026-107315
Ubuntu:26.04:LTSlibpgjavano fix listedUBUNTU-CVE-2026-107315
Ubuntu:26.10libpgjavano fix listedUBUNTU-CVE-2026-107315

Affected products (as reported)

VendorProductVersions
pgjdbc pgjdbc 42.7.4 – through 42.7.13

Weakness: CWE-226, CWE-201 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

References