Libpgjava: 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… (CVE-2026-107315)
Description
A vulnerability in the PostgreSQL JDBC Driver (pgjdbc) versions 42.7.4 through 42.7.13 causes padding of values shorter than their declared length with leftover bytes from the driver's send buffer instead of zeros. These leftover bytes include SQL text and parameter values from previous statements on the same connection, potentially exposing sensitive data from other requests. This occurs when applications use certain methods to set data with declared lengths larger than the actual data. Versions 42.7.3 and earlier do not exhibit this behavior.
CVSS v3.1
Score 5.3medium
Affected software
pkg:deb/ubuntu/libpgjava?arch=source&distro=trustypkg:deb/ubuntu/libpgjava?arch=source&distro=xenialpkg:deb/ubuntu/libpgjava?arch=source&distro=esm-apps/bionicpkg:deb/ubuntu/libpgjava?arch=source&distro=esm-apps/focalpkg:deb/ubuntu/libpgjava?arch=source&distro=jammypkg:deb/ubuntu/libpgjava?arch=source&distro=noblepkg:deb/ubuntu/libpgjava?arch=source&distro=stonkingpkg:deb/ubuntu/libpgjava?arch=source&distro=resoluteRun on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The PostgreSQL JDBC Driver (pgjdbc) versions 42.7.4 through 42.7.13 have a vulnerability where values shorter than their declared length are padded with residual bytes from the driver's send buffer rather than zeros. These residual bytes contain messages previously sent on the same connection, including SQL text and parameter values from recent statements. This leakage can occur when applications use PreparedStatement.setObject with a ByteStreamWriter, CopyIn.writeToCopy, PGCopyOutputStream.write, LargeObject.write, or Blob.setBytes, and declare a length larger than the actual data. The vulnerability allows an attacker who can cause the application to store such a value and read it back to collect sensitive data from earlier traffic on the connection. Applications that always match declared lengths to actual data are not affected. Versions 42.7.3 and earlier pad with zeros and are not vulnerable in this way.
Potential Impact
The vulnerability can lead to unintended data leakage where sensitive information from previous SQL statements on the same connection is exposed. This includes SQL text and parameter values, potentially compromising confidentiality. The maximum data leakage per padded value can be up to 8192 bytes, or 16320 bytes if GSS encryption is used on the connection. The vulnerability does not affect data integrity or availability but poses a confidentiality risk.
Mitigation Recommendations
No official patch or fix status is provided in the available data. Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Applications should ensure that declared lengths always match the actual data length when using the affected methods to avoid triggering the padding issue. Until a fix is available, avoid using vulnerable versions or carefully validate input lengths to prevent leakage.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- UBUNTU-CVE-2026-107315
- Osv Schema Version
- 1.7.0
- Ecosystems
- ["Ubuntu:14.04:LTS","Ubuntu:16.04:LTS","Ubuntu:Pro:18.04:LTS","Ubuntu:Pro:20.04:LTS","Ubuntu:22.04:LTS","Ubuntu:24.04:LTS","Ubuntu:26.10","Ubuntu:26.04:LTS"]
- Cvss Version
- 3.1
Threat ID: 6ad3f4dd2cdf04f656656cde
Added to database: 10/17/2026, 22:21:17 UTC
Last enriched: 10/17/2026, 22:34:23 UTC
Last updated: 10/17/2026, 22:34:23 UTC
Views: 2
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.