CVE-2024-27304Jackc Pgproto3
Critical 9.8 No auth needed
Follow: this CVE · Jackc · Jackc Pgproto3 We alert you by email or Slack (account required).
- 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
- 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.
What to do
- Apply the vendor's security update for Pgproto3.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How 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)
| Vendor | Product | Versions |
|---|---|---|
| jackc | pgproto3 | < 2.3.3 |
| jackc | pgx | < 4.18.2 |
| jackc | pgx | ≥ 5.0.0 < 5.5.4 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Vendor Advisory
- github.com Patch
- github.com Patch
- github.com Patch
- github.com Vendor Advisory
- www.youtube.com Press/Media Coverage