CVE-2026-107315
pgjdbc pads a value shorter than its declared length with bytes of earlier statements (rather than zeros)
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 Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.postgresql » postgresqlpreliminary | >= 42.7.4, <= 42.7.13 | - |
Blast radius
72% of the dependent artifacts (3,274) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 27,192 |
| 2 hops | 51,864 |
| 3 hops | 25,652 |
| 4 hops | 9,419 |
| 5 hops | 4,067 |
| 6 hops | 1,090 |
Most used dependents
- org.apache.kafka » kafka1,450 usages
- org.apache.hive » hive-exec699 usages
- org.apache.spark » spark-hive633 usages
- org.openmrs.api » openmrs-api564 usages
- org.openmrs.web » openmrs-web521 usages
- org.apache.solr » solr-core500 usages
- org.apache.hive » hive-jdbc404 usages
- org.apache.hive » hive-service301 usages
- io.quarkus » quarkus-jdbc-postgresql235 usages
- net.postgis » postgis-jdbc214 usages
- org.geoserver.web » gs-web-core194 usages
- io.zonky.test » embedded-postgres151 usages
- org.geotools.jdbc » gt-jdbc-postgis134 usages
- org.apache.oozie » oozie-core123 usages
- org.apache.flume » flume-ng-core118 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://repo.maven.apache.org/maven2
- Advisoryhttps://github.com/CVEProject/cvelistV5/tree/main/cves/2026/107xxx/CVE-2026-107315.json
- Advisoryhttps://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-f64h-wr5q-3qf3
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2026-107315
- Packagehttps://github.com/pgjdbc/pgjdbc
