CVE-2026-107315pgjdbc pads a value shorter than its declared length with bytes of earlier statements…
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.
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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libpgjava | Fix pending | UBUNTU-CVE-2026-107315 | |
| Ubuntu 26.04 | libpgjava | Under investigation | UBUNTU-CVE-2026-107315 | |
| Ubuntu 24.04 | libpgjava | Under investigation | UBUNTU-CVE-2026-107315 | |
| Ubuntu 22.04 | libpgjava | Under investigation | UBUNTU-CVE-2026-107315 | |
| Ubuntu 20.04 | libpgjava | Fix pending | UBUNTU-CVE-2026-107315 | |
| Ubuntu 18.04 | libpgjava | Fix pending | UBUNTU-CVE-2026-107315 | |
| Ubuntu 16.04 | libpgjava | Fix pending | UBUNTU-CVE-2026-107315 | |
| Ubuntu 14.04 | libpgjava | Fix pending | UBUNTU-CVE-2026-107315 | |
| Debian 14 | libpgjava | Fixed | 42.7.14-1 | DEBIAN-CVE-2026-107315 |
| Debian 13 | libpgjava | Fix pending | DEBIAN-CVE-2026-107315 | |
| Debian 12 | libpgjava | Fix pending | DEBIAN-CVE-2026-107315 | |
| Red Hat Enterprise Linux 10 | postgresql-jdbc | Not affected | ||
| Red Hat Enterprise Linux 9 | postgresql-jdbc | Not affected | ||
| Red Hat Enterprise Linux 8 | Judy | Not affected | ||
| Red Hat Enterprise Linux 8 | galera | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-backup | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-common | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-embedded | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-embedded-devel | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-errmsg | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-gssapi-server | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-oqgraph-engine | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-pam | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-server | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-server-galera | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-server-utils | Not affected | ||
| Red Hat Enterprise Linux 8 | mariadb-test | Not affected | ||
| Red Hat Enterprise Linux 8 | maven-assembly-plugin | Not affected | ||
| Red Hat Enterprise Linux 8 | maven-assembly-plugin-javadoc | Not 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.
- pgjdbc: affected: 42.7.4 to 42.7.13
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:
- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-f64h-wr5q-3qf3 (vendor-advisory)
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.