CVE-2024-27304
pgx SQL Injection via Protocol Message Size Overflow
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.
INFO
Published Date :
March 6, 2024, 7:15 p.m.
Last Modified :
Dec. 4, 2025, 5:33 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
CVSS Scores
| Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
|---|---|---|---|---|---|---|
| CVSS 3.1 | CRITICAL | [email protected] |
Solution
- Update the affected caddy package.
Public PoC/Exploit Available at Github
CVE-2024-27304 has a 2 public
PoC/Exploit available at Github.
Go to the Public Exploits tab to see the list.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-27304.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-27304 is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-27304
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
PoC of "DEF CON 32 - SQL Injection Isn't Dead Smuggling Queries at the Protocol Level - Paul Gerste"
Python Dockerfile Go HTML
CVE POC repo 자동 수집기
Python
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-27304 vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-27304 vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
Initial Analysis by [email protected]
Dec. 04, 2025
Action Type Old Value New Value Added CPE Configuration OR *cpe:2.3:a:pgx_project:pgx:*:*:*:*:*:go:*:* versions up to (excluding) 4.18.2 *cpe:2.3:a:pgx_project:pgx:*:*:*:*:*:go:*:* versions from (including) 5.0.0 up to (excluding) 5.5.4 *cpe:2.3:a:pgproto3_project:pgproto3:*:*:*:*:*:go:*:* versions up to (excluding) 2.3.3 Added Reference Type CVE: https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007 Types: Patch Added Reference Type GitHub, Inc.: https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007 Types: Patch Added Reference Type CVE: https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8 Types: Vendor Advisory Added Reference Type GitHub, Inc.: https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8 Types: Vendor Advisory Added Reference Type CVE: https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4 Types: Patch Added Reference Type GitHub, Inc.: https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4 Types: Patch Added Reference Type CVE: https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8 Types: Patch Added Reference Type GitHub, Inc.: https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8 Types: Patch Added Reference Type CVE: https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df Types: Patch Added Reference Type GitHub, Inc.: https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df Types: Patch Added Reference Type CVE: https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv Types: Vendor Advisory Added Reference Type GitHub, Inc.: https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv Types: Vendor Advisory Added Reference Type GitHub, Inc.: https://www.youtube.com/watch?v=Tfg1B8u1yvE Types: Press/Media Coverage -
CVE Modified by [email protected]
Dec. 12, 2024
Action Type Old Value New Value Added Reference https://www.youtube.com/watch?v=Tfg1B8u1yvE -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007 Added Reference https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8 Added Reference https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4 Added Reference https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8 Added Reference https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df Added Reference https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Received by [email protected]
Mar. 06, 2024
Action Type Old Value New Value Added 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. Added Reference GitHub, Inc. https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv [No types assigned] Added Reference GitHub, Inc. https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8 [No types assigned] Added Reference GitHub, Inc. https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007 [No types assigned] Added Reference GitHub, Inc. https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4 [No types assigned] Added Reference GitHub, Inc. https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8 [No types assigned] Added Reference GitHub, Inc. https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df [No types assigned] Added CWE GitHub, Inc. CWE-89 Added CWE GitHub, Inc. CWE-190 Added CVSS V3.1 GitHub, Inc. AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H