{"id":"CVE-2026-41889","published":"2026-05-08T15:53:00Z","modified":"2026-05-08T19:38:34Z","title":"pgx: SQL Injection via placeholder confusion with dollar quoted string literals","vendor":"jackc","product":"pgx","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":2.3,"severity":"LOW","version":"4.0","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","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00356,"percentile":0.30082,"provenance":"source"},"cwes":[{"id":"CWE-89","name":"Improper Neutralization of Special Elements used in an SQL Command"}],"references":[{"url":"https://github.com/jackc/pgx/security/advisories/GHSA-j88v-2chj-qfwx","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/jackc/pgx/commit/60644f84918a8af66d14a4b0d865d4edafd955da","tags":["x_refsource_MISC"]},{"url":"https://github.com/jackc/pgx/releases/tag/v5.9.2","tags":["x_refsource_MISC"]}],"priority":{"score":7.6,"factors":[{"name":"EPSS percentile","points":6.02},{"name":"CVSS severity","points":1.61}]},"vendorSlug":"jackc","affectedVersions":[{"vendor":"jackc","product":"pgx","versions":["< 5.9.2"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-05-08T19:38:09.336936Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/jackc/pgx/v5","vulnerableRanges":["<5.9.2"],"patched":["5.9.2"],"from":["GHSA-j88v-2chj-qfwx","GO-2026-5004"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/jackc/pgx/v4","vulnerableRanges":["<=4.18.3","all versions"],"patched":[],"from":["GHSA-j88v-2chj-qfwx","GO-2026-5004"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/jackc/pgx","vulnerableRanges":["<=3.6.2","all versions"],"patched":[],"from":["GHSA-j88v-2chj-qfwx","GO-2026-5004"],"provenance":"source"}],"summary":{"text":"A SQL injection flaw in the pgx PostgreSQL driver and toolkit for Go, affecting versions before 5.9.2, occurs when the non-default simple protocol is used and a dollar-quoted string literal in the query contains text that is interpreted as a placeholder outside a string literal. An attacker who can control the value of that placeholder and has low-privilege authenticated access and the ability to influence the query can inject SQL, with a limited integrity impact, provided the application uses the simple protocol and a dollar-quoted literal in the affected way.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:17:10Z"},"euvd":{"id":"EUVD-2026-28805","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-jackc-pgx-cve-2024-27289","parents":[{"from":"CVE-2024-27289","to":"CVE-2026-41889","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["internal/sanitize/sanitize.go"],"commits":["https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df","https://github.com/jackc/pgx/commit/60644f84918a8af66d14a4b0d865d4edafd955da"],"basis":"rarely changed file"},{"kind":"similar","provenance":"machine","score":0.47,"basis":"same product + CWE + description similarity"}]}],"packageHistory":[{"cve":"CVE-2024-27304","published":"2024-03-06","fixed":"5.5.4","kev":false},{"cve":"CVE-2026-33815","published":"2026-04-07","fixed":"5.9.0","kev":false,"link":{"from":"CVE-2026-33815","to":"CVE-2026-41889","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/jackc/pgx/v5","fromFixed":"5.9.0","toFixed":"5.9.2","daysApart":31}]}},{"cve":"CVE-2026-33816","published":"2026-04-07","fixed":"5.9.0","kev":false},{"cve":"CVE-2026-41889","published":"2026-05-08","fixed":"5.9.2","kev":false}],"package":"Go:github.com/jackc/pgx/v5"}}