{"api_version":"1","generated_at":"2026-06-03T19:46:31+00:00","cve":"CVE-2024-27289","urls":{"html":"https://cve.report/CVE-2024-27289","api":"https://cve.report/api/cve/CVE-2024-27289.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2024-27289","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2024-27289"},"summary":{"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 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.","state":"PUBLISHED","assigner":"GitHub_M","published_at":"2024-03-06 19:15:08","updated_at":"2026-05-21 19:57:50"},"problem_types":["CWE-89","CWE-89 CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')"],"metrics":[{"version":"3.1","source":"security-advisories@github.com","type":"Secondary","score":"8.1","severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.1,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"}},{"version":"3.1","source":"CNA","type":"DECLARED","score":"8.1","severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","data":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":8.1,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"references":[{"url":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df","name":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Patch"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p","name":"https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Vendor Advisory"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/","name":"https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/","refsource":"af854a3a-2127-422b-91ae-364da2661108","tags":["Third Party Advisory"],"title":"","mime":"","httpstatus":"","archivestatus":"0"},{"url":"https://www.cve.org/CVERecord?id=CVE-2024-27289","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27289","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[{"source":"CNA","vendor":"jackc","product":"pgx","version":"affected < 4.18.2","platforms":[]},{"source":"ADP","vendor":"jackc","product":"pgx","version":"affected 4.18.2 custom","platforms":[]}],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2024","cve_id":"27289","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"jackc","cpe5":"pgx","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"go","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":{"cve_year":"2024","cve_id":"27289","cve":"CVE-2024-27289","epss":"0.005910000","percentile":"0.694360000","score_date":"2026-05-27","updated_at":"2026-05-28 00:02:13"},"legacy_qids":[{"cve":"CVE-2024-27289","qid":"997621","title":"GO (Go) Security Update for github.com/jackc/pgx (GHSA-m7wr-2xf7-cm9p)"}]},"source_records":{"cve_program":{"containers":{"adp":[{"affected":[{"cpes":["cpe:2.3:a:jackc:pgx:*:*:*:*:*:*:*:*"],"defaultStatus":"unknown","product":"pgx","vendor":"jackc","versions":[{"lessThan":"4.18.2","status":"affected","version":"0","versionType":"custom"}]}],"metrics":[{"other":{"content":{"id":"CVE-2024-27289","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","timestamp":"2024-07-24T14:13:55.313789Z","version":"2.0.3"},"type":"ssvc"}}],"providerMetadata":{"dateUpdated":"2025-04-16T15:55:01.536Z","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","shortName":"CISA-ADP"},"title":"CISA ADP Vulnrichment"},{"providerMetadata":{"dateUpdated":"2025-06-12T15:45:56.361Z","orgId":"af854a3a-2127-422b-91ae-364da2661108","shortName":"CVE"},"references":[{"url":"https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/"},{"name":"https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p","tags":["x_refsource_CONFIRM","x_transferred"],"url":"https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p"},{"name":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df","tags":["x_refsource_MISC","x_transferred"],"url":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df"}],"title":"CVE Program Container","x_generator":{"engine":"ADPogram 0.0.1"}}],"cna":{"affected":[{"product":"pgx","vendor":"jackc","versions":[{"status":"affected","version":"< 4.18.2"}]}],"descriptions":[{"lang":"en","value":"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"}],"metrics":[{"cvssV3_1":{"attackComplexity":"HIGH","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":8.1,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"NONE","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-89","description":"CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')","lang":"en","type":"CWE"}]}],"providerMetadata":{"dateUpdated":"2024-03-06T18:28:12.291Z","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","shortName":"GitHub_M"},"references":[{"name":"https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p","tags":["x_refsource_CONFIRM"],"url":"https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p"},{"name":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df","tags":["x_refsource_MISC"],"url":"https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df"}],"source":{"advisory":"GHSA-m7wr-2xf7-cm9p","discovery":"UNKNOWN"},"title":"pgx SQL Injection via Line Comment Creation"}},"cveMetadata":{"assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","assignerShortName":"GitHub_M","cveId":"CVE-2024-27289","datePublished":"2024-03-06T18:28:12.291Z","dateReserved":"2024-02-22T18:08:38.873Z","dateUpdated":"2025-06-12T15:45:56.361Z","state":"PUBLISHED"},"dataType":"CVE_RECORD","dataVersion":"5.1"},"nvd":{"publishedDate":"2024-03-06 19:15:08","lastModifiedDate":"2026-05-21 19:57:50","problem_types":["CWE-89","CWE-89 CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')"],"metrics":{"cvssMetricV31":[{"source":"security-advisories@github.com","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","baseScore":8.1,"baseSeverity":"HIGH","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":2.2,"impactScore":5.9}]},"configurations":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:a:jackc:pgx:*:*:*:*:*:go:*:*","versionEndExcluding":"4.18.2","matchCriteriaId":"46A3AE50-BDE3-41DC-9E17-9151318A3E94"}]}]}]},"legacy_mitre":{"record":{"CveYear":"2024","CveId":"27289","Ordinal":"1","Title":"pgx SQL Injection via Line Comment Creation","CVE":"CVE-2024-27289","Year":"2024"},"notes":[{"CveYear":"2024","CveId":"27289","Ordinal":"1","NoteData":"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.","Type":"Description","Title":"pgx SQL Injection via Line Comment Creation"}]}}}