postgresql is vulnerable to Insertion of Sensitive Information Into Sent Data
42
CVE Score
Medium
Insertion of Sensitive Information Into Sent Data
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.
Upgrade the org.postgresql:postgresql package to version 42.7.6 or later.
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.
42.7.4 - 42.7.5
Fixed in 42.7.6postgresql is vulnerable to Insertion of Sensitive Information Into Sent Data in versions 42.7.4 - 42.7.5.
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.
I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant
ISO 42001Compliant© All Intel data is openly available and commercially licensed.