CVE-2024-27304
CWE-89Published: March 6, 2024· Updated: Jun 17, 2026
Official Description
pgx is a PostgreSQL driver and toolkit for Go. SQL injection can occur if an attacker can cause a single query or bind message to exceed 4 GB in size. An integer overflow in the calculated message size can cause the one large message to be sent as multiple messages under the attacker's control. The problem is resolved in v4.18.2 and v5.5.4. As a workaround, reject user input large enough to cause a single query or bind message to exceed 4 GB in size.
Risk Analysis
The pgx PostgreSQL driver for Go is vulnerable to SQL injection due to an integer overflow when processing messages exceeding 4 GB. This critical flaw is remotely exploitable and carries a CVSS score of 9.8. No active exploitation has been reported.
There is no known public exploit for this vulnerability, and it is not in the CISA KEV.
Upgrade pgx to version 4.18.2 or 5.5.4, or implement input size limits to reject messages over 4 GB.
Technical Analysis
CVE-2024-27304 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.
The vulnerability requires no privileges and no user interaction, making it a prime target for automated exploitation campaigns and worm-like propagation.
A successful exploit results in complete confidentiality breach (data exposure), full integrity compromise (data manipulation), availability disruption (denial of service), with a CVSS base score of 9.8.
From a weakness classification perspective (CWE-89): SQL injection vulnerabilities allow attackers to manipulate database queries, potentially exposing or modifying sensitive data.
CVSS v3.1 Vector Breakdown
Affected Vendors & Products
Exploit & PoC Resources
Official Patches & Advisories
All References (13)
Quick Facts
Related CVEs (CWE-89)
Recommended Actions
- →Apply vendor patches immediately
- →Monitor CVE-2024-27304 in threat intel feeds
- →Review IDS/IPS signatures for exploitation attempts