{"schema_version":"1.7.5","id":"GO-2026-5004","published":"2026-06-22T18:40:49Z","modified":"2026-06-25T18:45:14.963912684Z","aliases":["CVE-2026-41889","GHSA-j88v-2chj-qfwx"],"related":["CGA-rrgr-7xqx-rg3q"],"summary":"SQL Injection via placeholder confusion with dollar quoted string literals in github.com/jackc/pgx","details":"SQL Injection can occur when using the non-default simple protocol with a dollar quoted string literal in the SQL query. If that string literal contains text that would be interpreted as a placeholder outside of a string literal, and the value of that placeholder is controllable by the attacker, an injection may be possible.\n\nFor example, an attacker could provide a value that includes a closing dollar quote followed by malicious SQL commands. This is unlikely to occur outside of a contrived scenario.","affected":[{"package":{"name":"github.com/jackc/pgx","ecosystem":"Go","purl":"pkg:golang/github.com/jackc/pgx"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"ecosystem_specific":{"imports":[{"path":"github.com/jackc/pgx/internal/sanitize","symbols":["Query.Sanitize","SanitizeSQL"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2026-5004.json"}},{"package":{"name":"github.com/jackc/pgx/v4","ecosystem":"Go","purl":"pkg:golang/github.com/jackc/pgx/v4"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"}]}],"ecosystem_specific":{"imports":[{"path":"github.com/jackc/pgx/v4/internal/sanitize","symbols":["Query.Sanitize","SanitizeSQL"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2026-5004.json"}},{"package":{"name":"github.com/jackc/pgx/v5","ecosystem":"Go","purl":"pkg:golang/github.com/jackc/pgx/v5"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"5.9.2"}]}],"ecosystem_specific":{"imports":[{"path":"github.com/jackc/pgx/v5/internal/sanitize","symbols":["Query.Sanitize","SanitizeSQL"]}]},"database_specific":{"source":"https://vuln.go.dev/ID/GO-2026-5004.json"}}],"references":[{"type":"ADVISORY","url":"https://github.com/jackc/pgx/security/advisories/GHSA-j88v-2chj-qfwx"},{"type":"FIX","url":"https://github.com/jackc/pgx/commit/60644f84918a8af66d14a4b0d865d4edafd955da"},{"type":"WEB","url":"https://github.com/jackc/pgx/releases/tag/v5.9.2"}],"database_specific":{"review_status":"REVIEWED","url":"https://pkg.go.dev/vuln/GO-2026-5004"},"credits":[{"name":"Jack Christensen"}]}