Summary
Workarounds
Do not use the simple protocol to execute queries matching all the above conditions.
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.
Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access. Typical impact: data disclosure or modification.
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Remediation advice
The problem is resolved in v5.9.2.
Frequently Asked Questions
- What is CVE-2026-41889? CVE-2026-41889 is a low-severity SQL injection vulnerability in github.com/jackc/pgx/v5 (go), affecting versions < 5.9.2. It is fixed in 5.9.2. Untrusted input alters a database query, allowing the attacker to read or modify data the query was not intended to access.
- Which packages are affected by CVE-2026-41889?
github.com/jackc/pgx/v5(go) (versions < 5.9.2)github.com/jackc/pgx/v4(go) (versions <= 4.18.3)github.com/jackc/pgx(go) (versions <= 3.6.2)
- Is there a fix for CVE-2026-41889? Yes. CVE-2026-41889 is fixed in 5.9.2. Upgrade to this version or later.
- Is CVE-2026-41889 exploitable, and should I be worried? Whether CVE-2026-41889 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-41889 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-41889? Upgrade
github.com/jackc/pgx/v5to 5.9.2 or later.