CVEfocus › CVE database › CVE-2024-27304

CVE-2024-27304pgx SQL Injection via Protocol Message Size Overflow

CVSS 9.8 CriticalEPSS 1.5% (higher than 74% of CVEs)Published 2024-03-06Updated 2024-12-12Assigner: GitHub_M

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.

CWE-190CWE-89

What to do

Fixed builds are available from Debian, Go: see the table below for the fixed version per release.

Debian, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

8Fixed
5Fix pending
5Under investigation
10Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10golang-github-jackc-pgproto3Fix pendingUBUNTU-CVE-2024-27304
Ubuntu 26.10golang-github-jackc-pgxFix pendingUBUNTU-CVE-2024-27304
Ubuntu 26.04golang-github-jackc-pgproto3Under investigationUBUNTU-CVE-2024-27304
Ubuntu 26.04golang-github-jackc-pgxUnder investigationUBUNTU-CVE-2024-27304
Ubuntu 25.10golang-github-jackc-pgproto3Will not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2024-27304
Ubuntu 25.10golang-github-jackc-pgxWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2024-27304
Ubuntu 24.04golang-github-jackc-pgproto3Under investigationUBUNTU-CVE-2024-27304
Ubuntu 24.04golang-github-jackc-pgxUnder investigationUBUNTU-CVE-2024-27304
Ubuntu 22.04golang-github-jackc-pgxUnder investigationUBUNTU-CVE-2024-27304
Debian 14golang-github-jackc-pgconnFixed1.14.3-1DEBIAN-CVE-2024-27304
Debian 14golang-github-jackc-pgxFixed4.18.1-2DEBIAN-CVE-2024-27304
Debian 13golang-github-jackc-pgconnFix pendingDEBIAN-CVE-2024-27304
Debian 13golang-github-jackc-pgxFixed4.18.1-2DEBIAN-CVE-2024-27304
Debian 12golang-github-jackc-pgconnFix pendingDEBIAN-CVE-2024-27304
Debian 12golang-github-jackc-pgxFix pendingDEBIAN-CVE-2024-27304
Red Hat Enterprise Linux 9osbuild-composerWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-coreWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-dnf-jsonWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-workerWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composerWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-coreWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-dnf-jsonWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-workerWill not fix
Will not fix
Go librarygithub.com/jackc/pgproto3Fixed2.3.3GHSA-7jwh-3vrq-q3m8
Go librarygithub.com/jackc/pgproto3/v2Fixed2.3.3GO-2024-2606
Go librarygithub.com/jackc/pgxFixed4.18.2GHSA-mrww-27vc-gghv
Go librarygithub.com/jackc/pgx/v4Fixed4.18.2GO-2024-2606
Go librarygithub.com/jackc/pgx/v5Fixed5.5.4GHSA-mrww-27vc-gghv

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.