github.com/jackc/pgx/v5
Affected
- introduced
0, fixed5.9.2(semver)
Fixed versions
5.9.2
Fix
- Fixed version
5.9.2go get github.com/jackc/pgx/[email protected]
Advisory
Also known as: CVE-2026-41889, GO-2026-5004
pgx: SQL Injection via placeholder confusion with dollar quoted string literals
Impact
SQL Injection can occur when:
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.
Low Basis: The source's own band: LOW
0, fixed 5.9.2 (semver)5.9.2
5.9.2go get github.com/jackc/pgx/[email protected]0, last affected 4.18.3 (semver)None listed
No fixed version is listed.
0, last affected 3.6.2 (semver)None listed
No fixed version is listed.
Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0