CVE-2024-27304pgx SQL Injection via Protocol Message Size Overflow
- 9.8CriticalCVSS base score
- 1.1%Exploitation in 30 daysEPSS · top 34% of all CVEs
- NoKnown exploitednot in CISA's KEV catalog
- NonePublic exploitsnone known yet
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.
Timeline
ID reserved
By GitHub_M
- 13 days later
· 13 days later
Published
- 9 months later
· 9 months later
Record updated
Changes after publication (a new score, a public exploit, EPSS crossing 1, 10 or 50 %, leaving KEV) are kept since November 2026; earlier ones are not known.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| NVDNVD · Analyzed | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 1.1% · top 34% of all CVEs (17 Nov 2026)
- CISA SSVC
- Exploitation: none · Automatable: yes · Technical impact: partial
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.8.
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Gogithub.com/jackc/pgxGHSA-mrww-27vc-gghv (opens in a new tab)
- Gogithub.com/jackc/pgx/v4GHSA-mrww-27vc-gghv (opens in a new tab)
- Gogithub.com/jackc/pgx/v5GHSA-mrww-27vc-gghv (opens in a new tab)
References
References7
- https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8 (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df (opens in a new tab)x_refsource_MISCx_transferred
- https://www.youtube.com/watch?v=Tfg1B8u1yvE (opens in a new tab)x_refsource_MISC
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- EUVD EUVD-2024-0972 (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-mrww-27vc-gghv (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://cveledger.app/cve/CVE-2024-27304)Record last updated .