{"id":"CVE-2024-27289","summary":"pgx SQL Injection via Line Comment Creation","details":"pgx is a PostgreSQL driver and toolkit for Go. Prior to version 4.18.2, SQL injection can occur when all of the following conditions are met: the non-default simple protocol is used; a placeholder for a numeric value must be immediately preceded by a minus; there must be a second placeholder for a string value after the first placeholder; both must be on the same line; and both parameter values must be user-controlled. The problem is resolved in v4.18.2. As a workaround, do not use the simple protocol or do not place a minus directly before a placeholder.\n","aliases":["GHSA-m7wr-2xf7-cm9p","GO-2024-2605"],"modified":"2026-04-10T05:11:44.861676Z","published":"2024-03-06T18:28:12.291Z","related":["CGA-6fr5-f876-7rfw"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27289.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-89"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27289.json"},{"type":"ADVISORY","url":"https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27289"},{"type":"FIX","url":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df"},{"type":"ARTICLE","url":"https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/jackc/pgx","events":[{"introduced":"0"},{"fixed":"14690df4c533758df97f7cc561cb9062155045c6"}]}],"versions":["v2.0.0","v2.1.0","v2.10.0","v2.11.0","v2.2.0","v2.3.0","v2.4.0","v2.5.0","v2.6.0","v2.7.0","v2.7.1","v2.8.0","v2.8.1","v2.9.0","v3.0.0","v3.0.1","v3.1.0","v3.2.0","v4.0.0","v4.0.0-pre1","v4.0.0-pre2","v4.0.0-rc1","v4.0.0-rc2","v4.0.1","v4.1.0","v4.1.1","v4.1.2","v4.10.0","v4.10.1","v4.11.0","v4.12.0","v4.13.0","v4.14.0","v4.14.1","v4.15.0","v4.16.0","v4.16.1","v4.17.0","v4.17.1","v4.17.2","v4.18.0","v4.18.1","v4.2.0","v4.2.1","v4.3.0","v4.4.0","v4.4.1","v4.5.0","v4.6.0","v4.7.0","v4.7.1","v4.7.2","v4.8.0","v4.8.1","v4.9.0","v4.9.1","v4.9.2"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-27289.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"}]}