CVE-2024-27304

CRITICAL

pgx <4.18.2, <5.5.4 - SQL Injection

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 2 public exploits for CVE-2024-27304. PoCs published by flying-owl, roaris.

AI-analyzed exploit summary The repository contains a functional exploit PoC for CVE-2024-27304, targeting a vulnerability in Go-PGX. The exploit involves decoding base64-encoded usernames to files, which can be manipulated to achieve unauthorized access or command execution.

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

The repository contains a functional exploit PoC for CVE-2024-27304, targeting a vulnerability in Go-PGX. The exploit involves decoding base64-encoded usernames to files, which can be manipulated to achieve unauthorized access or command execution.

Classification
Working Poc 90%
Attack Type
Auth Bypass
Complexity
Moderate
Reliability
Reliable
Target: Go-PGX (specific version not explicitly stated)
No auth needed
Prerequisites: Access to the login endpoint · Ability to send crafted HTTP requests
devstral-2 · analyzed Mar 20, 2026 Full analysis →
nomisec WORKING POC
by roaris · poc
https://github.com/roaris/CVE-2024-27304-PoC

This repository contains a proof-of-concept exploit for CVE-2024-27304, targeting a SQL injection vulnerability in pgx v5.5.3 via PostgreSQL protocol message size overflow. The exploit demonstrates how an attacker can inject malicious queries by manipulating the message format sent to the database server.

Classification
Working Poc 95%
Attack Type
Sqli
Complexity
Moderate
Reliability
Reliable
Target: pgx v5.5.3
No auth needed
Prerequisites: Access to the target web application · PostgreSQL database with pgx v5.5.3
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Scores

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

CISA SSVC

Vulnrichment
Exploitation none
Automatable yes
Technical Impact partial

Details

CWE
CWE-190 CWE-89
Status published
Products (6)
jackc/pgproto3 < 2.3.3
jackc/pgx < 4.18.2
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