Get a Demo

Let's Patch It!

Book a short call with one our specialists, we'll walk you through how Endor Patches work, and ask you a few questions about your environment (like your primary programming languages and repository management). We'll also send you an email right after you fill out the form, feel free to reply with any questions you have in advance!

CVE

CVE-2026-41889

pgx: SQL Injection via placeholder confusion with dollar quoted string literals
Back to all
CVE

CVE-2026-41889

pgx: SQL Injection via placeholder confusion with dollar quoted string literals

Impact

SQL Injection can occur when:

  1. The non-default simple protocol is used.
  2. A dollar quoted string literal is used in the SQL query.
  3. That string literal contains text that would be would be interpreted as a placeholder outside of a string literal.
  4. The value of that placeholder is controllable by the attacker.

e.g.

attackValue := `$tag$; drop table canary; --`
_, err = tx.Exec(ctx, `select $tag$ $1 $tag$, $1`, pgx.QueryExecModeSimpleProtocol, attackValue)

This is unlikely to occur outside of a contrived scenario.

Patches

The problem is resolved in v5.9.2.

Workarounds

Do not use the simple protocol to execute queries matching all the above conditions.

Package Versions Affected

Package Version
patch Availability
No items found.

Automatically patch vulnerabilities without upgrading

Fix Without Upgrading
Detect compatible fix
Apply safe remediation
Fix with a single pull request

CVSS Version

Severity
Base Score
CVSS Version
Score Vector
C
H
U
2.3
-
4.0
CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
C
H
U
0
-
C
H
U
-

Related Resources

No items found.

References

https://github.com/jackc/pgx/security/advisories/GHSA-j88v-2chj-qfwx, https://nvd.nist.gov/vuln/detail/CVE-2026-41889, https://github.com/jackc/pgx/commit/60644f84918a8af66d14a4b0d865d4edafd955da, https://github.com/jackc/pgx, https://github.com/jackc/pgx/releases/tag/v5.9.2

Severity

9.8

CVSS Score
0
10

Basic Information

Ecosystem
Base CVSS
9.8
EPSS Probability
0.0001%
EPSS Percentile
0.01153%
Introduced Version
0
Fix Available
5.9.2,5.1.1-r1,3.7.14-r0,4.0.5-r0,2.18.0-r6,2.11.2-r9,0.51.0-r19,1.29.0-r4,1.72.2-r0,2.33.0-r5,2.33.0-r4,18.10.4-r3,18.11.2-r2,18.9.6-r3,18.10.4-r1,18.9.6-r1,18.10.5-r1,18.11.2-r1,12.2.8.01-r4,13.0.1-r2,0.15.0-r6,6.5.1-r1,2.5.3-r0,0.151.0-r0,0.36.18-r1,6.2.0-r8,1.33.10.2.3-r2,2.7.1-r9,17.7.23-r0,18.7.6-r0,1.31.0-r0,4.14.0-r0

Fix Critical Vulnerabilities Instantly

Secure your app without upgrading.
Fix Without Upgrading