CVE-2026-41889
pgx: SQL Injection via placeholder confusion with dollar quoted string literals
Also known as GHSA-j88v-2chj-qfwx, GO-2026-5004
Mitigation
- Upgrade github.com/jackc/pgx/v5 to 5.9.2 or later.
Who should check
- Projects that depend on Go package github.com/jackc/pgx/v5 (< 5.9.2)
- Projects that depend on Go package github.com/jackc/pgx/v4 (<= 4.18.3)
- Projects that depend on Go package github.com/jackc/pgx (<= 3.6.2)
- Anyone running jackc pgx < 5.9.2
Vulnerability facts
- Affected
- github.com/jackc/pgx/v5 < 5.9.2; github.com/jackc/pgx/v4 <= 4.18.3; github.com/jackc/pgx <= 3.6.2
- Fixed in
- 5.9.2
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, login needed
- CVSS
- 2.3 (v4.0, CNA)CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: High
- Attack requirements: Present
- Privileges required: Low
- User interaction: None
- Confidentiality impact: None
- Integrity impact: Low
- Availability impact: None
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.49% chance of exploitation in 30 days (percentile 35, 2026-11-26)
- CWE
- CWE-89
- Modified
Description
pgx is a PostgreSQL driver and toolkit for Go. Prior to version 5.9.2, 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, and the value of that placeholder is controllable by the attacker. This issue has been patched in version 5.9.2.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/jackc/pgx/v5 | < 5.9.2 | 5.9.2 | osv |
| Go github.com/jackc/pgx/v4 | <= 4.18.3 | — | osv |
| Go github.com/jackc/pgx | <= 3.6.2 | — | osv |
| jackc pgx | < 5.9.2 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-41889. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-41889.md Affected: github.com/jackc/pgx/v5 < 5.9.2; github.com/jackc/pgx/v4 <= 4.18.3; github.com/jackc/pgx <= 3.6.2 Fixed in: 5.9.2 Steps: 1. Search this machine and project for github.com/jackc/pgx/v5 (Go), github.com/jackc/pgx/v4 (Go), github.com/jackc/pgx (Go), jackc pgx: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-41889 being exploited?
There is no confirmed exploitation: CVE-2026-41889 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.49% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-41889?
Low: CVSS 2.3 (v4.0, scored by CNA). Remote, login needed. The attack needs conditions outside the attacker's control, which makes it harder.
Which versions are affected by CVE-2026-41889?
github.com/jackc/pgx/v5 < 5.9.2; github.com/jackc/pgx/v4 <= 4.18.3; github.com/jackc/pgx <= 3.6.2.
Is there a fix for CVE-2026-41889?
Yes. Fixed in 5.9.2. Upgrade github.com/jackc/pgx/v5 to 5.9.2 or later.
How do I check if I'm affected by CVE-2026-41889?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.