Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-107315 EUVD-2026-94650

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

Published Oct 7, 2026 · Updated Oct 8, 2026 · Assigned by PostgreSQL

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 products

VendorProductAffectedFixed
pgjdbc pgjdbc 42.7.4 – ≤ 42.7.13 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 libpgjava 42.7.14-1 —
Debian 13 libpgjava No fix yet —
Debian 12 libpgjava No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 libpgjava No fix yet —
Ubuntu 26.04 LTS libpgjava No fix yet —
Ubuntu 24.04 LTS libpgjava No fix yet —
Ubuntu 22.04 LTS libpgjava No fix yet —
Ubuntu 16.04 LTS libpgjava No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 14.04 LTS libpgjava No fix yet —
Ubuntu Pro 20.04 LTS libpgjava No fix yet —
Ubuntu Pro 18.04 LTS libpgjava No fix yet —

Advisories 1

References