High severity · published Mar 6, 2024
CVE-2024-27289
pgx is a PostgreSQL driver and toolkit for Go
8.1
CVSS
0.8%
EPSS
No
On KEV
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.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Unchanged
Exploitation
Is it being used?
Exploit prediction (EPSS)0.8% · higher than 58% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
PG
Pgx · Jackc
before 4.18.2 · source: NVD
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2024-27289
CVE.org
https://www.cve.org/CVERecord?id=CVE-2024-27289
Patch
https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df
Vendor Advisory
https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p
Third Party Advisory
https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/
More from Pgx
9.8
CVE-2026-41889
pgx: SQL Injection via placeholder confusion with dollar quoted string literals
9.8
CVE-2026-33816
CVE-2026-33816 in github.com/jackc/pgx
9.8
CVE-2026-33815
CVE-2026-33815 in github.com/jackc/pgx
9.8
CVE-2024-27304
pgx is a PostgreSQL driver and toolkit for Go
