CVEfocus › CVE database › CVE-2026-107315

CVE-2026-107315pgjdbc pads a value shorter than its declared length with bytes of earlier statements…

CVSS 5.3 MediumEPSS 0.2% (higher than 5% of CVEs)Published 2026-10-07Updated 2026-10-08Assigner: PostgreSQL

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.

CWE-201CWE-226

What to do

Fixed builds are available from Debian: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

1Fixed
7Fix pending
3Under investigation
20Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10libpgjavaFix pendingUBUNTU-CVE-2026-107315
Ubuntu 26.04libpgjavaUnder investigationUBUNTU-CVE-2026-107315
Ubuntu 24.04libpgjavaUnder investigationUBUNTU-CVE-2026-107315
Ubuntu 22.04libpgjavaUnder investigationUBUNTU-CVE-2026-107315
Ubuntu 20.04libpgjavaFix pendingUBUNTU-CVE-2026-107315
Ubuntu 18.04libpgjavaFix pendingUBUNTU-CVE-2026-107315
Ubuntu 16.04libpgjavaFix pendingUBUNTU-CVE-2026-107315
Ubuntu 14.04libpgjavaFix pendingUBUNTU-CVE-2026-107315
Debian 14libpgjavaFixed42.7.14-1DEBIAN-CVE-2026-107315
Debian 13libpgjavaFix pendingDEBIAN-CVE-2026-107315
Debian 12libpgjavaFix pendingDEBIAN-CVE-2026-107315
Red Hat Enterprise Linux 10postgresql-jdbcNot affected
Red Hat Enterprise Linux 9postgresql-jdbcNot affected
Red Hat Enterprise Linux 8JudyNot affected
Red Hat Enterprise Linux 8galeraNot affected
Red Hat Enterprise Linux 8mariadbNot affected
Red Hat Enterprise Linux 8mariadb-backupNot affected
Red Hat Enterprise Linux 8mariadb-commonNot affected
Red Hat Enterprise Linux 8mariadb-develNot affected
Red Hat Enterprise Linux 8mariadb-embeddedNot affected
Red Hat Enterprise Linux 8mariadb-embedded-develNot affected
Red Hat Enterprise Linux 8mariadb-errmsgNot affected
Red Hat Enterprise Linux 8mariadb-gssapi-serverNot affected
Red Hat Enterprise Linux 8mariadb-oqgraph-engineNot affected
Red Hat Enterprise Linux 8mariadb-pamNot affected
Red Hat Enterprise Linux 8mariadb-serverNot affected
Red Hat Enterprise Linux 8mariadb-server-galeraNot affected
Red Hat Enterprise Linux 8mariadb-server-utilsNot affected
Red Hat Enterprise Linux 8mariadb-testNot affected
Red Hat Enterprise Linux 8maven-assembly-pluginNot affected
Red Hat Enterprise Linux 8maven-assembly-plugin-javadocNot affected

What the vendor says

As published in the CVE record by PostgreSQL, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Make the declared length match the data: ByteStreamWriter.getLength() must equal the number of bytes writeTo() writes, and the (offset, length) passed to the byte-array methods must lie within the array. No connection property turns the behavior off.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.