CVE-2026-134843: pgjdbc leaves a half-written message on the connection after an unchecked exception

Published Nov 23, 2026
·
Updated

pgjdbc, the PostgreSQL JDBC Driver, does not close the connection when an unchecked exception interrupts a request. Part of a Bind message stays in the send buffer, and the server reads the bytes that follow as the rest of it. The bytes of a value uploaded later on the same connection can then run as a SQL command. Since 42.6.0 a setBinaryStream() value without a length that is executed again throws such an exception, as does the driver's own retry after SQLState 0A000 or 26000. An application stream that throws an unchecked exception has the same effect in all versions. All versions before 42.7.15 are affected, and 42.7.15 fixes the problem.

Affected Software

1 affected component
maven/org.postgresql/postgresql<42.7.15

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pgjdbc to a version that resolves this vulnerability.

    Fixed in 42.7.15

Event History

Nov 23, 2026
CVE Published
via MITRE·04:59 PM
Data Sourced
via MITRE·04:59 PM
RemedyDescriptionSeverityWeakness
Data Sourced
via NVD·05:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which applications are most likely to be exposed?

Applications using pgjdbc versions before 42.7.15 are affected if an unchecked exception can interrupt a request and the application later uploads a value on the same connection. The documented driver-triggered cases include re-executing a setBinaryStream() value without a length since 42.6.0, and the driver's retry after SQLState 0A000 or 26000; an application stream throwing an unchecked exception can trigger the issue in all affected versions.

2

What does an attacker need to exploit this?

An unchecked exception must interrupt a request after part of a Bind message has been left in the connection send buffer. Data sent later on that same connection can then be interpreted by PostgreSQL as the remainder of the message and run as a SQL command.

3

Are default deployments affected?

Affected driver versions are not exposed merely by being installed. Exploitation depends on a request being interrupted by an unchecked exception and subsequent data being sent over the same connection.

4

What should be done if upgrading cannot happen immediately?

Avoid reusing a connection after an unchecked exception interrupts a request; close the connection instead. This prevents later uploaded data from being appended to the half-written message.

5

How can I determine whether my application is affected?

Check whether the application uses pgjdbc before 42.7.15 and whether it reuses connections after unchecked exceptions during request or stream processing. Review use of setBinaryStream() without a length that is executed again, retries following SQLState 0A000 or 26000, and application-provided streams that can throw unchecked exceptions.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203