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

Summary

CVECVE-2026-107315
StatePUBLISHED
AssignerPostgreSQL
Source PriorityCVE Program / NVD first with legacy fallback
Published2026-10-08 00:16:33 UTC
Updated2026-10-08 00:16:33 UTC
Descriptionpgjdbc, 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.

Risk And Classification

Primary CVSS: v3.1 5.3 MEDIUM from f86ef6dc-4d3a-42ad-8f28-e6d5547a5007

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

Problem Types: CWE-201 | CWE-226 | CWE-226 CWE-226 Sensitive Information in Resource Not Removed Before Reuse | CWE-201 CWE-201 Insertion of Sensitive Information Into Sent Data


VersionSourceTypeScoreSeverityVector
3.1f86ef6dc-4d3a-42ad-8f28-e6d5547a5007Secondary5.3MEDIUMCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
3.1CNADECLARED5.3MEDIUMCVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Pgjdbc Pgjdbc affected 42.7.4 42.7.13 maven Not specified

References

ReferenceSourceLinkTags
github.com/pgjdbc/pgjdbc/security/advisories/GHSA-f64h-wr5q-3qf3 f86ef6dc-4d3a-42ad-8f28-e6d5547a5007 github.com
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Vendor Comments And Credit

Discovery Credit

CNA: Vladimir Sitnikov (en)

Additional Advisory Data

Workarounds

CNA: 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.

© CVE.report 2026

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report