CVE-2026-134841: pgjdbc parses quoted text as SQL in JDBC escapes, dollar quotes and E strings

Published Nov 23, 2026
·
Updated

pgjdbc, the PostgreSQL JDBC Driver, misreads some quoted text in its query parser. A } inside a literal ends a JDBC escape such as {ts}, and the rest of the literal is translated as SQL. A dollar quote whose tag has a non-ASCII symbol or space is not recognized. An E'' string with a doubled quote is scanned as a standard string. {fn right} and {fn timestampdiff} with a negative argument produce a -- comment. In each case text that the application quoted correctly can run as SQL with the privileges of the application's database role. 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 exposed to this issue?

Applications using the PostgreSQL JDBC Driver before 42.7.15 are affected when they send queries containing the vulnerable JDBC escape, dollar-quote, or E-string parsing patterns. The injected SQL executes with the privileges of the application's database role.

2

What does an attacker need to exploit the issue?

An attacker needs to influence text placed by the application into a quoted SQL literal that reaches one of the parser edge cases. The affected cases include a } in a JDBC escape literal, an unrecognized dollar-quote tag containing a non-ASCII symbol or space, an E'' string with a doubled quote, and negative arguments to {fn right} or {fn timestampdiff}.

3

What is the remediation?

Upgrade pgjdbc to version 42.7.15. This version fixes the issue; all earlier versions are affected.

4

How can I determine whether I am affected?

Check the version of the org.postgresql:postgresql dependency used by the application. Any version before 42.7.15 is affected.

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