CVE-2026-41889 — v5
Fix: jackc/pgx@60644f8CVE-2026-41889 is a SQL Injection vulnerability in github.com/jackc/pgx/v5. A fix is available for github.com/jackc/pgx/v5 — see the affected versions and patch details below.
pgx: SQL Injection via placeholder confusion with dollar quoted string literals
Exploitation Status
No confirmed exploitation observed yet
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-41889.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
Real-World Exposure
github.com/jackc/pgx/v5🐹github.com/jackc/pgx/v4🐹github.com/jackc/pgxReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.
Description
Impact
SQL Injection can occur when:
- The non-default simple protocol is used.
- A dollar quoted string literal is used in the SQL query.
- That string literal contains text that would be would be interpreted as a placeholder outside of a string literal.
- 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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐹Go | github.com/jackc/pgx/v5 | all versions | 5.9.2go get github.com/jackc/pgx/v5@v5.9.2 |
| 🐹Go | github.com/jackc/pgx/v4 | all versions | No fix |
| 🐹Go | github.com/jackc/pgx | all versions | No fix |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/jackc/pgx/v5, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update github.com/jackc/pgx/v5 to 5.9.2 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-41889 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 Security's impact-aware SCA analyses which vulnerable code paths your application actually calls, so a match like CVE-2026-41889 can be triaged on real exposure rather than presence alone.
Tailored to CVE-2026-41889. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
Red Hat has rated this flaw as Moderate because the SQL injection vulnerability in pgx can only be triggered when the non-default simple protocol is used in conjunction with specific query constructions involving PostgreSQL dollar-quoted string literals. Successful exploitation requires multiple uncommon…
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Advanced Cluster Security 4.9 | advanced-cluster-security/rhacs-main-rhel8:1785413210 | RHSA-2026:48872 |
| Red Hat Advanced Cluster Security for Kubernetes 4.10 | advanced-cluster-security/rhacs-main-rhel8:1785420959 | RHSA-2026:48913 |
| Red Hat Hardened Images | go-fdo-server-main-1.0.1-0.2.hum1 | RHSA-2026:15856 |
| Red Hat Hardened Images | caddy-main-2.11.3-0.1.hum1 | RHSA-2026:16133 |
| Red Hat Hardened Images | cosign-main-3.1.1-0.1.hum1 | RHSA-2026:25138 |
Frequently Asked Questions
Is CVE-2026-41889 in your dependencies?
O3 Security finds CVE-2026-41889 across Go dependencies, including transitive ones, and its impact-aware SCA ranks findings by whether your code actually calls the vulnerable path.