CVE-2026-134841

pgjdbc parses quoted text as SQL in JDBC escapes, dollar quotes and E strings

High published · updated

8.1
CVSS score out of 10 · NVD (f86ef6dc-4d3a-42ad-8f28-e6d5547a5007)

Description

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 products and versions

Product / packageEcosystem / vendorVersionsFixed inSource
org.postgresql:postgresql maven 0 → <42.7.1542.7.15 CVE.org
pgjdbc pgjdbc 0 → <42.7.1542.7.15 CVE.org

References