CVE-2024-27304

CRITICAL
Published Mar 6, 2024 Modified Dec 4, 2025 CWE-89 CWE-190

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.

Is your site exposed to CVE-2024-27304?

Run a free security scan — no signup, results in seconds.

CVSS v3.1 Score

9.8
CRITICAL
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Weakness Type (CWE)

CWE-89 SQL Injection
CWE-190 Integer Overflow

Affected Products

Vendor Product
pgproto3_project pgproto3
pgx_project pgx
pgx_project pgx

References

Frequently Asked Questions

What is CVE-2024-27304? +
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. It has a CVSS v3.1 base score of 9.8 (CRITICAL).
How severe is CVE-2024-27304? +
CVE-2024-27304 has a CVSS v3.1 score of 9.8 out of 10, rated CRITICAL. This is a critical vulnerability that should be patched immediately.
What products are affected by CVE-2024-27304? +
CVE-2024-27304 affects products from pgproto3_project, pgx_project, specifically: pgproto3, pgx. Check the affected products table above for specific version ranges.
How do I check if I'm vulnerable to CVE-2024-27304? +
You can use Secably's free Website Scanner to check your website for known vulnerabilities. For infrastructure scanning, use the Port Scanner to identify exposed services that may be affected. Check the vendor advisories linked above for specific patch and version information.

Related Vulnerabilities

Don't wait for an exploit

Scan your website for vulnerabilities like CVE-2024-27304 — free, no signup required.