Sourced from github.com/jackc/pgx/v5's changelog.
5.9.2 (April 18, 2026)
Fix SQL Injection via placeholder confusion with dollar quoted string literals (GHSA-j88v-2chj-qfwx)
SQL injection can occur when:
- The non-default simple protocol is used.
- A dollar quoted string literal is used in the SQL query.
- That query contains text that would be would be interpreted outside 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.
0aeabbc
Release v5.9.260644f8
Fix SQL sanitizer bugs with dollar-quoted strings and placeholder
overflowa5680bc
Merge pull request #2531 from
dolmen-go/godoc-add-linkse34e452
doc: Add godoc links08c9bb1
Fix Stringer types encoded as text instead of numeric value in composite
fields96b4dbd
Remove unstable testacf88e0
Merge pull request #2526 from
abrightwell/abrightwell-min-proto2f81f1f
Update max_protocol_version and
min_protocol_version defaults