CVE-2024-27304

CRITICAL

pgx <4.18.2, <5.5.4 - SQL Injection

Title source: llm

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.

Exploits (2)

nomisec WORKING POC
by flying-owl · poc
https://github.com/flying-owl/Go-PGX-Vulnerability-POC-Public-Mirror
nomisec WORKING POC
by roaris · poc
https://github.com/roaris/CVE-2024-27304-PoC

Scores

CVSS v3 9.8
EPSS 0.0187
EPSS Percentile 83.2%
Attack Vector NETWORK
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Details

CWE
CWE-190 CWE-89
Status published
Products (4)
jackc/pgx 0 - 4.18.2 (2 CPE variants)Go
jackc/pgx 5.0.0 - 5.5.4Go
pgproto3_project/pgproto3 < 2.3.3
pgx_project/pgx < 4.18.2
Published Mar 06, 2024
Tracked Since Feb 18, 2026