9.8
CRITICAL CVSS 3.1
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 !
Affected Products

The following products are affected by CVE-2024-27304 vulnerability. Even if cvefeed.io is aware of the exact versions of the products that are affected, the information is not represented in the table below.

ID Vendor Product Action
1 Pgproto3_project pgproto3
1 Pgx_project pgx
CVSS Scores
The Common Vulnerability Scoring System is a standardized framework for assessing the severity of vulnerabilities in software and systems. We collect and displays CVSS scores from various sources for each CVE.
Score Version Severity Vector Exploitability Score Impact Score Source
CVSS 3.1 CRITICAL [email protected]
Solution
This information is provided by the 3rd party feeds.
  • 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.

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:

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

Updated: 1 month, 3 weeks ago
0 stars 0 fork 0 watcher
Born at : Oct. 12, 2025, 12:56 p.m. This repo has been linked 1 different CVEs too.

CVE POC repo 자동 수집기

Python

Updated: 1 week, 2 days ago
5 stars 1 fork 1 watcher
Born at : June 8, 2025, 3:07 p.m. This repo has been linked 184 different CVEs too.

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
EPSS is a daily estimate of the probability of exploitation activity being observed over the next 30 days. Following chart shows the EPSS score history of the vulnerability.
Vulnerability Scoring Details
Base CVSS Score: 9.8
Attack Vector
Attack Complexity
Privileges Required
User Interaction
Scope
Confidentiality Impact
Integrity Impact
Availability Impact