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

Published Updated

Applications quoting certain text with pgjdbc can have quoted text run as SQL, exposing or altering database data.

CVSS score

High

8.1/10

CVSS 3.1 · Scored by PostgreSQL Breakdown
Exploited in the wild
Not known
Not in CISA's KEV catalogue
Exploit code
None known
No public exploit found
Fix
Available
42.7.15
Attack path
Over the internet
No login, no user action

What is CVE-2026-134841?

CVE-2026-134841 is a high-severity SQL injection vulnerability in pgjdbc, published on 23 Nov 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-89

How severe is CVE-2026-134841?

CVE-2026-134841 scores 8.1 out of 10 under CVSS 3.1, which is high severity. It was scored by PostgreSQL.

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Which versions are affected by CVE-2026-134841?

An affected version is only exploitable if your software uses the vulnerable function or option. Many projects that include it are not exposed.

How do I fix CVE-2026-134841?

Upgrade pgjdbc to 42.7.15 or later. The advisory says that version fixes it.

Use parameterised queries everywhere and never build SQL by joining strings. Upgrade affected software first; a web application firewall only buys time. More about SQL injection.

Is CVE-2026-134841 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-134841 exists.

Sources

Also known as DEBIAN-CVE-2026-134841, GHSA-4743-5rfh-f7mp, UBUNTU-CVE-2026-134841.

Is CVE-2026-134841 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free