Live threats

All CVEs / Jackc

CVE-2024-27304Jackc Pgproto3

Critical 9.8 No auth needed

Priority
74
CVSS 3.1
9.8
EPSS
1.5%
probability of exploitation in 30 days · percentile 74
Auth required
No
Published
Mar 6, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-89, CWE-190
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Pgproto3.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Go github.com/jackc/pgproto3 < 2.3.3 2.3.3 go get github.com/jackc/pgproto3@v2.3.3
Go github.com/jackc/pgproto3/v2 < 2.3.3 2.3.3 go get github.com/jackc/pgproto3/v2@v2.3.3
Go github.com/jackc/pgproto3/v2 < 2.3.3 2.3.3 go get github.com/jackc/pgproto3/v2@v2.3.3
Go github.com/jackc/pgx < 4.18.2 4.18.2 go get github.com/jackc/pgx@v4.18.2
Go github.com/jackc/pgx ≥ 5.0.0 < 5.5.4 5.5.4 go get github.com/jackc/pgx@v5.5.4
Go github.com/jackc/pgx all no fixed version —
Go github.com/jackc/pgx/v4 < 4.18.2 4.18.2 go get github.com/jackc/pgx/v4@v4.18.2
Go github.com/jackc/pgx/v4 < 4.18.2 4.18.2 go get github.com/jackc/pgx/v4@v4.18.2
Go github.com/jackc/pgx/v5 ≥ 5.0.0 < 5.5.4 5.5.4 go get github.com/jackc/pgx/v5@v5.5.4
Go github.com/jackc/pgx/v5 ≥ 5.0.0 < 5.5.4 5.5.4 go get github.com/jackc/pgx/v5@v5.5.4

Per OSV / GitHub Advisories (GHSA-7jwh-3vrq-q3m8, GO-2024-2606, GHSA-mrww-27vc-gghv). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
jackcpgproto3< 2.3.3
jackcpgx< 4.18.2
jackcpgx≥ 5.0.0 < 5.5.4

Official sources

References

Links published by the sources. Open them with care.