{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2024-27289","id":"CVE-2024-27289","title":"pgx SQL Injection via Line Comment Creation","description":"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 mu","descriptionLong":"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","published":"2024-03-06T18:28:12.291Z","updated":"2026-10-28T02:30:39.910018527Z","reserved":"2024-02-22T18:08:38.873Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},"metrics":[{"version":"4.0","score":null,"vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","rating":"high","source":"GitHub"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub_M"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"github.com"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"},{"version":"3.1","score":8.1,"vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"GitHub"}],"rating":"high","products":["jackc pgx"],"affectedProducts":[{"vendor":"jackc","product":"pgx","defaultStatus":null,"versions":[{"version":"< 4.18.2","status":"affected"}],"platforms":[]}],"packages":[{"ecosystem":"Go","name":"github.com/jackc/pgx","purl":"pkg:golang/github.com/jackc/pgx","ranges":["<4.18.2","all versions"],"fixed":["4.18.2"],"advisory":"GHSA-m7wr-2xf7-cm9p"},{"ecosystem":"Go","name":"github.com/jackc/pgx/v4","purl":"pkg:golang/github.com/jackc/pgx/v4","ranges":["<4.18.2"],"fixed":["4.18.2"],"advisory":"GHSA-m7wr-2xf7-cm9p"}],"cwes":["CWE-89"],"aliases":["GHSA-m7wr-2xf7-cm9p","GO-2024-2605"],"references":[{"url":"https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p","tags":["x_refsource_CONFIRM","x_transferred","Vendor Advisory","advisory","web"]},{"url":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df","tags":["x_refsource_MISC","x_transferred","Patch","fix","web"]},{"url":"https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/","tags":["Third Party Advisory","article"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27289.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27289","tags":["advisory"]},{"url":"https://github.com/jackc/pgx","tags":["package"]},{"url":"https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw","tags":["web"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total"},"epss":0.00847,"epssPercentile":0,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2024-27289","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27289","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2024-27289","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-m7wr-2xf7-cm9p","ok":true,"note":"GHSA-m7wr-2xf7-cm9p"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2024-27289","ok":true,"note":"scored "}],"aiTitle":false,"tech":[],"critical":[],"attention":null}