# CVE-2026-41889: pgx: SQL Injection via placeholder confusion with dollar quoted string literals

> Attackers can execute arbitrary SQL commands via placeholder confusion in dollar-quoted strings when using the non-default simple protocol in the pgx Go driver.

- **Severity:** Low 2.3 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 8 May 2026
- **Updated:** 8 May 2026
- **Also known as:** AZL-86322, AZL-86325, CLEANSTART-2026-FX70874, CLEANSTART-2026-IO66056, CLEANSTART-2026-MY24201, CLEANSTART-2026-SL23707, CLEANSTART-2026-VN81441, DEBIAN-CVE-2026-41889, ECHO-ba06-dc6e-f24d, GHSA-j88v-2chj-qfwx, GO-2026-5004, MINI-2376-hx5c-3r9r, MINI-23xx-qpw9-f7hh, MINI-26w8-v3xw-wxrr, MINI-2chc-9r3v-6r5q, MINI-2jfv-w2h3-6gw8, MINI-2q54-wf2r-8xr5, MINI-2vch-j629-mjpq, MINI-2wf3-f5mj-955g, MINI-2xvq-hgfg-mjq8, MINI-35h9-5xw6-g5wf, MINI-36qw-57jw-59cx, MINI-38fx-rxc5-2mc5, MINI-38xp-m9mm-2524, MINI-397m-fwfw-chcg, MINI-3f7q-3hqw-38rg, MINI-3f9h-xr5q-x6m4, MINI-3h2c-m99v-pvhq, MINI-3j56-7xv2-2mwc, MINI-3mc9-6wh7-7w69, MINI-3w29-vg9p-j2j8, MINI-43v4-m335-3ch2, MINI-43wh-j8gm-hp6g, MINI-44xm-25r7-h5mv, MINI-4548-f56g-m8vg, MINI-46jx-2hff-5jcm, MINI-475r-m59r-mr27, MINI-4f8r-g6pg-pw92, MINI-52pv-9g9f-gv83, MINI-5955-jr6v-g492, MINI-59p3-2jpg-x2xq, MINI-5mf9-p6j5-4prv, MINI-63q3-wc89-h5jq, MINI-66xw-v43c-gr4g, MINI-6gmj-wr8m-mccv, MINI-6v5q-hm7c-j736, MINI-6wvq-qqp4-55j2, MINI-6x4g-rvx8-3c5p, MINI-6xm9-h365-w862, MINI-7g7q-7883-gf74, MINI-7jgv-rpxx-8rc9, MINI-7m96-282q-vfm3, MINI-7p5j-cj58-wwj2, MINI-7vqj-wprg-w6c8, MINI-7x9g-cpv6-782x, MINI-7xh2-r6wh-c853, MINI-8529-8vcj-mwh7, MINI-869f-m37r-wg78, MINI-89xx-wxc7-qcrv, MINI-8f67-w4wx-4jcf, MINI-8ff4-964r-vrfm, MINI-8fpv-xw3v-9www, MINI-8hr6-rm94-fpm7, MINI-8hxq-prm5-jjjp, MINI-8vvj-2757-ww5v, MINI-8wvh-qwjf-cv7f, MINI-8x7p-89m6-4vfj, MINI-9c5c-9hxw-rxrf, MINI-9f3c-xfh7-28qg, MINI-9m4p-3cr9-93mg, MINI-9q36-xvh6-fg4f, MINI-9v73-7783-xj8p, MINI-c8f3-24p7-cwv7, MINI-c9m9-8cvr-7pg5, MINI-cpf9-8x3p-q2gp, MINI-cw3w-w87q-2qv6, MINI-cwwf-jh95-37mr, MINI-f2c9-p764-m829, MINI-fgr9-fj75-7qph, MINI-fjr9-2f8m-9vjr, MINI-fmf9-mq7p-9h8r, MINI-fq3q-8pgq-24fp, MINI-fqf7-p6x4-94jw, MINI-g3hv-9h5p-m5wv, MINI-g6p5-jwq7-xh35, MINI-g8c4-g3x6-m4x8, MINI-g9cg-pprh-p6wr, MINI-gr3g-pqxr-mr9r, MINI-grj9-c3cv-pq54, MINI-gvxm-mwp9-34pw, MINI-gwc7-wccf-5pwp, MINI-h5r9-2vx7-32hf, MINI-h89q-w822-vx8f, MINI-hg8p-7xwg-j9j8, MINI-hhhg-6764-xm47, MINI-hj27-qqv3-q3h9, MINI-hx3f-6g5r-rvq9, MINI-j36x-hrhg-jgfm, MINI-j7w7-45h4-f62f, MINI-jc8x-67m9-6g98, MINI-jh84-pr2h-89r5, MINI-jr7f-88ww-g5c7, MINI-m264-gwxp-v7fg, MINI-m328-79x3-fcpf, MINI-m33w-4jfc-cg9v, MINI-m547-3c76-4v5g, MINI-m5f3-fwgj-f2g7, MINI-m6c5-84jj-9rxf, MINI-mf6c-8hxj-54gw, MINI-mmfh-7q4c-chv5, MINI-mmj7-cgcq-69pc, MINI-mq2q-jrrv-v662, MINI-p29w-8v8p-5hjf, MINI-pf5h-cc47-6wvc, MINI-phg9-hq2c-g6wc, MINI-phhf-6vph-x3mp, MINI-pwm8-jvqc-m73x, MINI-q575-fxf9-m449, MINI-q7rc-5fr9-mg4x, MINI-qc3c-8m6r-3jfr, MINI-qj75-x657-3q68, MINI-qjqc-6pw2-rphw, MINI-qx6q-6vrv-fq5v, MINI-qx7f-9r74-q6jx, MINI-qxjw-m2vc-xm82, MINI-r6pw-p7mc-jgx5, MINI-rhmq-jc8g-vvj2, MINI-rp4f-vc76-r65j, MINI-rp78-f7qw-g4x6, MINI-v8pm-w77f-7wvq, MINI-vp7h-x4mx-5m2c, MINI-vq8w-wr94-cp5c, MINI-vxcg-xxq8-jprw, MINI-w4q4-3m7f-8gpx, MINI-w8fg-jpf8-p7fm, MINI-wg3r-h974-v7cq, MINI-wggm-xv7g-w6px, MINI-wh72-9c82-2wm7, MINI-whxx-4mc7-xg23, MINI-wqjm-39jr-7x5c, MINI-x82m-9c55-qjvf, MINI-x8fv-fqm4-q49m, MINI-x8hw-58rw-86xx, MINI-x9xg-wv66-wm3r, MINI-xf8v-83j3-334j, RHSA-2026:15856, RHSA-2026:16133, ROOT-APP-GOBINARY-CVE-2026-41889, UBUNTU-CVE-2026-41889, openSUSE-SU-2026:10976-1, openSUSE-SU-2026:10992-1

## What is CVE-2026-41889?

CVE-2026-41889 is a low-severity SQL injection vulnerability in jackc pgx, published on 8 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2026-41889?

9 open source packages ship an affected version, including github.com/jackc/pgx, github.com/jackc/pgx/v4 and github.com/jackc/pgx/v5. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/jackc/pgx` | Go | All versions | None |
| `github.com/jackc/pgx` | Go | All versions to 3.6.2 | None |
| `github.com/jackc/pgx` | Go | All versions to 3.6.2 | None |
| `github.com/jackc/pgx/v4` | Go | All versions | None |
| `github.com/jackc/pgx/v4` | Go | All versions to 4.18.3 | None |
| `github.com/jackc/pgx/v4` | Go | All versions to 4.18.3 | None |
| `github.com/jackc/pgx/v5` | Go | All versions | 5.9.2 |
| `github.com/jackc/pgx/v5` | Go | All versions | 5.9.2 |
| `github.com/jackc/pgx/v5` | Go | All versions | 5.9.2 |
| `caddy` | Red Hat:hummingbird:1 | All versions | 0:2.11.3-0.1.hum1 |
| `go-fdo-server` | Red Hat:hummingbird:1 | All versions | 0:1.0.1-0.2.hum1 |
| `go-fdo-server-manufacturer` | Red Hat:hummingbird:1 | All versions | 0:1.0.1-0.2.hum1 |
| `go-fdo-server-owner` | Red Hat:hummingbird:1 | All versions | 0:1.0.1-0.2.hum1 |
| `go-fdo-server-rendezvous` | Red Hat:hummingbird:1 | All versions | 0:1.0.1-0.2.hum1 |
| `alloy` | openSUSE:Tumbleweed | All versions | 1.16.1-2.1 |
| `steampipe` | openSUSE:Tumbleweed | All versions | 2.4.4-1.1 |

Products: Jackc Pgx.

## How do I fix CVE-2026-41889?

Upgrade to a fixed version.

## Is CVE-2026-41889 being exploited?

There is no known exploitation of CVE-2026-41889 in the wild and no public exploit code.

## Other vulnerabilities in jackc pgx

- [CVE-2026-33815](https://insights.sbomify.com/CVE-2026-33815/): CVE-2026-33815 in github.com/jackc/pgx (critical 9.8)
- [CVE-2026-33816](https://insights.sbomify.com/CVE-2026-33816/): CVE-2026-33816 in github.com/jackc/pgx (critical 9.8)
- [CVE-2024-27289](https://insights.sbomify.com/CVE-2024-27289/): pgx SQL Injection via Line Comment Creation (high 8.1)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41889 and fix it if it is affected.

What it is: CVE-2026-41889 is a low-severity SQL injection vulnerability in jackc pgx, published on 8 May 2026. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-41889 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/jackc/pgx (Go): affected all versions; no fix listed
- github.com/jackc/pgx (Go): affected all versions up to 3.6.2; no fix listed
- github.com/jackc/pgx (Go): affected all versions up to 3.6.2; no fix listed
- github.com/jackc/pgx/v4 (Go): affected all versions; no fix listed
- github.com/jackc/pgx/v4 (Go): affected all versions up to 4.18.3; no fix listed
- github.com/jackc/pgx/v4 (Go): affected all versions up to 4.18.3; no fix listed
- github.com/jackc/pgx/v5 (Go): affected all versions; fixed in 5.9.2
- github.com/jackc/pgx/v5 (Go): affected all versions; fixed in 5.9.2
- github.com/jackc/pgx/v5 (Go): affected all versions; fixed in 5.9.2

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41889/ (Markdown: https://insights.sbomify.com/CVE-2026-41889/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41889
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41889
- OSV: https://osv.dev/vulnerability/CVE-2026-41889

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41889/
Summaries are generated and may contain mistakes; the official description above is the record.
