Home / jackc / pgx / CVE-2024-27304
CVE-2024-27304: is it exploited, and which versions of jackc pgx are affected and fixed?
CVE-2024-27304 is a SQL injection vulnerability in jackc pgx. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 16:09 UTC). Affected: github.com/jackc/pgx before 4.18.2, github.com/jackc/pgx from 5.0.0 before 5.5.4, github.com/jackc/pgx/v4 before 4.18.2 and 1 more (GitHub advisory GHSA-mrww-27vc-gghv). Fixed in 4.18.2 and 5.5.4 (GitHub advisory GHSA-mrww-27vc-gghv). Severity: Critical (9.8, CVSS 3.1, from GitHub_M).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 16:09 UTC, CVE record November 19, 2026, 07:11 UTC and NVD November 19, 2026, 07:31 UTC.
What is CVE-2024-27304?
pgx SQL Injection via Protocol Message Size Overflow
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.
From the CVE record by GitHub_M, last updated December 12, 2024, 20:52 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| jackc | pgx | < 4.18.2 >= 5.0.0, < 5.5.4 |
As the CVE record by GitHub_M states it, last updated December 12, 2024. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Which packages are affected, and in which version is each fixed?
| Ecosystem | Package | Affected | Fixed in | Advisory |
|---|---|---|---|---|
| Go | github.com/jackc/pgx | < 4.18.2 | 4.18.2 | GHSA-mrww-27vc-gghv |
| Go | github.com/jackc/pgx | >= 5.0.0, < 5.5.4 | 5.5.4 | GHSA-mrww-27vc-gghv |
| Go | github.com/jackc/pgx/v4 | < 4.18.2 | 4.18.2 | GHSA-mrww-27vc-gghv |
| Go | github.com/jackc/pgx/v5 | >= 5.0.0, < 5.5.4 | 5.5.4 | GHSA-mrww-27vc-gghv |
GitHub Advisory Database, reviewed advisories (CC BY 4.0); advisory updated December 12, 2024. Summary: pgx SQL Injection via Protocol Message Size Overflow.
Which products and versions does the NVD list as affected?
| Vendor | Product | Versions | Type |
|---|---|---|---|
| jackc | pgproto3 | before 2.3.3 | application |
| jackc | pgx | before 4.18.2 | application |
| jackc | pgx | from 5.0.0 before 5.5.4 | application |
NVD analysis (status Analyzed), last modified June 17, 2026, 07:19 UTC.
How severe is CVE-2024-27304?
| Score | Version | Vector | Source |
|---|---|---|---|
| Critical 9.8 | CVSS 3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H | GitHub_M |
Each score is shown as its source gave it: the CNA that wrote the record, CISA's ADP (vulnrichment) and the NVD. They can differ.
What the ratings mean: in CVSS 3 and 4, scores run from 0 to 10, with Low 0.1 to 3.9, Medium 4.0 to 6.9, High 7.0 to 8.9 and Critical 9.0 to 10.0. CVSS 2 has no Critical band: its High runs from 7.0 to 10.0. The vector lists how the flaw is reached (network, local), what an attacker needs (privileges, a user's click) and what it can harm.
Is CVE-2024-27304 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- CISA SSVC
- Exploitation: none; automatable: yes; technical impact: partial (CISA ADP, March 6, 2024)
- EPSS
- 1.11% probability of exploitation activity in the next 30 days, percentile 67.0 (FIRST EPSS, scores of December 3, 2026)
What kind of flaw is it?
- CWE-89 Improper Neutralization of Special Elements used in an SQL Command
- CWE-190 Integer Overflow or Wraparound
Where are the vendor advisories and references?
- https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv x_refsource_CONFIRM
- https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8 x_refsource_MISC
- https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007 x_refsource_MISC
- https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4 x_refsource_MISC
- https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8 x_refsource_MISC
- https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df x_refsource_MISC
- https://www.youtube.com/watch?v=Tfg1B8u1yvE x_refsource_MISC
When was it published, and where is the official record?
- Reserved
- February 22, 2024
- Published
- March 6, 2024, 19:07 UTC
- CVE record updated
- December 12, 2024, 20:52 UTC by GitHub_M
- NVD
- Analyzed, last modified June 17, 2026, 07:19 UTC
- Last checked
- CVE list November 19, 2026, 07:11 UTC; NVD November 19, 2026, 07:31 UTC; KEV December 3, 2026, 16:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect pgx?
- May 8, 2026CVE-2026-41889 jackc pgx: SQL injection
- Mar 6, 2024CVE-2024-27289 jackc pgx: SQL injection
Questions about CVE-2024-27304
Is CVE-2024-27304 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 16:09 UTC. FIRST's EPSS gives it a 1.11% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of jackc pgx are affected by CVE-2024-27304?
github.com/jackc/pgx before 4.18.2, github.com/jackc/pgx from 5.0.0 before 5.5.4, github.com/jackc/pgx/v4 before 4.18.2 and github.com/jackc/pgx/v5 from 5.0.0 before 5.5.4, per the GitHub advisory GHSA-mrww-27vc-gghv. The tables above give every range the sources list.
Which version fixes CVE-2024-27304?
4.18.2 and 5.5.4, per the GitHub advisory GHSA-mrww-27vc-gghv. Check the vendor's advisory before you rely on it.
How severe is CVE-2024-27304?
Critical (9.8, CVSS 3.1, from GitHub_M). The severity table above shows each score with its source.
Where is the official record of CVE-2024-27304?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.