Safeguard
Application Security•

pgjdbc 42.7.14: Stale Buffer Bytes in Your Rows and a requireAuth Gap

Three PostgreSQL JDBC driver CVEs from 7 and 8 October 2026 can store earlier traffic inside your data or let cleartext password auth through. All three are fixed by 42.7.14.

Safeguard Security Team
3 min read

The PostgreSQL JDBC driver, pgjdbc, got three CVEs on 7 and 8 October 2026: CVE-2026-107313, CVE-2026-107314 and CVE-2026-107315. NVD rates them medium, from 4.2 to 5.9. The unusual part is that under certain conditions the driver writes bytes from its own earlier traffic into your database column.

What's affected

CVEAffected versionsConditionNVD score
CVE-2026-10731342.7.4 and 42.7.5GSS encryption on (gssEncMode prefer or require); values of 16320 bytes or more4.2
CVE-2026-10731442.7.11 through 42.7.13requireAuth excludes all six known methods, or is a bare comma5.9
CVE-2026-10731542.7.4 through 42.7.13Declared length larger than the data supplied5.3

CVE-2026-107313 is fixed in 42.7.6, and 42.7.14 fixes the others, so 42.7.14 covers all three.

CVE-2026-107315 is the broadest and needs no special connection property. The driver pads a short value with bytes left in its send buffer instead of zeros. NVD says those bytes are earlier messages on the same connection, including SQL text and parameter values, and on a pooled connection they can come from other requests. It happens when an application declares a length larger than the data, through setObject with a ByteStreamWriter, CopyIn.writeToCopy, PGCopyOutputStream.write, LargeObject.write or Blob.setBytes. The GitHub advisory says the only workaround is to make the declared length match the data, and that values already stored may contain leaked data.

CVE-2026-107314 only applies if you set requireAuth to an exclusion list such as all six methods negated. The driver then accepts any method the server asks for, including cleartext password. The property has no default, so unset means not affected.

To see your exposure, check the resolved version and grep for the APIs and properties:

mvn dependency:tree -Dincludes=org.postgresql:postgresql
grep -rnE "gssEncMode|requireAuth|ByteStreamWriter|writeToCopy|PGCopyOutputStream|LargeObject|setBytes" --include=*.java --include=*.properties --include=*.yml .

What to do now

  1. Upgrade org.postgresql:postgresql to 42.7.14, and check the resolved version in the final artifact, since frameworks often bundle their own.
  2. Use a positive list such as requireAuth=scram-sha-256 instead of exclusions.
  3. Make declared lengths equal the bytes written, and sample columns written through those calls for stray data.

Quick check

You never set requireAuth or gssEncMode. Which CVE might still apply?

CVE-2026-107315, if any code declares a length larger than the data it writes. It only needs 42.7.4 through 42.7.13.

Sources

Never miss an update

Weekly insights on software supply chain security, delivered to your inbox.

Self-healing security runs on Safeguard.

Your first fix PR is minutes away.

No sales call required, even your agent can complete the purchase over MCP.