Intel

AIKIDO-2026-157727

postgresql is vulnerable to Insertion of Sensitive Information Into Sent Data

CVE-2026-107313Published Oct 29, 2026
October 29, 2026

42

CVE Score

Medium

Insertion of Sensitive Information Into Sent Data

Are you affected? Scan for Free

TL;DR

pgjdbc's GSSOutputStream.writeWrapped() method, reached whenever the driver sends a large value (e.g. via setString, setBytes, a ByteStreamWriter parameter, CopyIn.writeToCopy, or LargeObject.write) over a connection configured with gssEncMode=prefer or require, called gssContext.wrap() on the stream's own internal buffer (buf) instead of the caller-supplied array (b). When the internal buffer happened to be empty or exactly full at the start of a chunked write, this sent the previous buffer's stale contents — bytes from earlier protocol messages such as prior SQL text, parameters, or batch rows — in place of the first ~16320 bytes of the new value, which the server stored without error; in other alignments the mismatched offset instead threw an ArrayIndexOutOfBoundsException. The default gssEncMode=allow does not enable GSS encryption, so unencrypted connections are unaffected. The fix changes the gssContext.wrap(buf, off, len, messageProp) call to gssContext.wrap(b, off, len, messageProp), wrapping the caller's actual data instead of the stream's internal buffer.

How do I fix this?

Upgrade the org.postgresql:postgresql package to version 42.7.6 or later.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and are configuring the driver to establish GSS-encrypted connections.

Package

Versions

42.7.4 - 42.7.5

Fixed in 42.7.6

Background info

postgresql is vulnerable to Insertion of Sensitive Information Into Sent Data in versions 42.7.4 - 42.7.5.

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea