CVE-2024-27304: pgx SQL Injection via Protocol Message Size Overflow
Impact
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.
Patches
The problem is resolved in v4.18.2 and v5.5.4.
Workarounds
Reject user input large enough to cause a single query or bind message to exceed 4 GB in size.
Other sources
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.
— MITRE
pgx SQL Injection via Protocol Message Size Overflow
— Microsoft
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-27304?
The severity of CVE-2024-27304 is high due to the potential for SQL injection attacks.
How do I fix CVE-2024-27304?
To fix CVE-2024-27304, upgrade to pgx version 4.18.2, pgproto3 version 2.3.3, or appropriate versions of the affected packages as outlined in the vulnerability report.
What software is affected by CVE-2024-27304?
CVE-2024-27304 affects the pgx and pgproto3 packages in various versions.
Can an attacker exploit CVE-2024-27304 remotely?
Yes, an attacker can exploit CVE-2024-27304 remotely if they can send a maliciously crafted query.
What type of attack can result from CVE-2024-27304?
CVE-2024-27304 can lead to SQL injection attacks due to an integer overflow in message size calculation.