CVE-2024-27304 pgx SQL Injection via Protocol Message Size Overflow
CriticalCVSS 9.8
EPSS 1.1%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- No known exploitation · automatable: yes · technical impact: partial
- Technology
- UbuntuDebian
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.
Upgrade path
19 packages: 6 fixed, 1 partially fixed, 12 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/golang-github-jackc-pgconn(Debian 12) | = 1.11.0-2; = 1.14.0-1; = 1.14.3-1; = 1.14.3-1~exp0 +1 more | No fix listed | No fix yet |
| debian/golang-github-jackc-pgconn(Debian 13) | = 1.14.0-1; = 1.14.3-1; = 1.14.3-1~exp0; All versions | No fix listed | No fix yet |
| debian/golang-github-jackc-pgx(Debian 12) | = 4.15.0-4; = 4.18.1-1; = 4.18.1-2; = 4.18.3-1 +3 more | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu 24.04) | = 2.2.0-2; = 2.3.2-1; All versions | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu 25.10) | = 2.3.2-1; All versions | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu 26.04) | = 2.3.2-1; All versions | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu 26.10) | = 2.3.2-1; = 2.3.3-2; All versions | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgx(Ubuntu 22.04) | = 3.6.2-2; All versions | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgx(Ubuntu 24.04) | = 4.15.0-4; = 4.18.1-1; All versions | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgx(Ubuntu 25.10) | = 4.18.1-1; = 4.18.1-2; All versions | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgx(Ubuntu 26.04) | = 4.18.1-2; All versions | No fix listed | No fix yet |
| ubuntu/golang-github-jackc-pgx(Ubuntu 26.10) | = 4.18.1-2; = 4.18.3-2; All versions | No fix listed | No fix yet |
| jackc pgx(Go) | < 4.18.2; >= 5.0.0, < 5.5.4; All versions | 4.18.2, 5.5.4 | Partially fixed |
| debian/golang-github-jackc-pgconn(Debian 14) | < 1.14.3-1; = 1.14.0-1; = 1.14.3-1~exp0 | 1.14.3-1 | Fixed |
| debian/golang-github-jackc-pgx(Debian 13) | < 4.18.1-2 | 4.18.1-2 | Fixed |
| debian/golang-github-jackc-pgx(Debian 14) | < 4.18.1-2 | 4.18.1-2 | Fixed |
| jackc github.com/jackc/pgproto3 | < 2.3.3 | 2.3.3 | Fixed |
| jackc github.com/jackc/pgproto3(Go) | < 2.3.3 | 2.3.3 | Fixed |
| jackc pgx | < 4.18.2; = < 4.18.2; = >= 5.0.0, < 5.5.4; >= 5.0.0, < 5.5.4 | 4.18.2, 5.5.4 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| jackc github.com/jackc/pgproto3(Go) | < 2.3.3 | 2.3.3 |
| jackc pgx(Go) | < 4.18.2 | 4.18.2 |
| jackc pgx(Go) | >= 5.0.0, < 5.5.4 | 5.5.4 |
| jackc pgx(Go) | All versions | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:12) | All versions | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:12) | = 1.11.0-2 | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:12) | = 1.14.0-1 | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:12) | = 1.14.3-1 | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:12) | = 1.14.3-1~exp0 | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:13) | All versions | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:13) | = 1.14.0-1 | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:13) | = 1.14.3-1 | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:13) | = 1.14.3-1~exp0 | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:14) | < 1.14.3-1 | 1.14.3-1 |
| debian/golang-github-jackc-pgconn(Debian:14) | = 1.14.0-1 | No fix listed |
| debian/golang-github-jackc-pgconn(Debian:14) | = 1.14.3-1~exp0 | No fix listed |
| debian/golang-github-jackc-pgx(Debian:12) | All versions | No fix listed |
| debian/golang-github-jackc-pgx(Debian:12) | = 4.15.0-4 | No fix listed |
| debian/golang-github-jackc-pgx(Debian:12) | = 4.18.1-1 | No fix listed |
| debian/golang-github-jackc-pgx(Debian:12) | = 4.18.1-2 | No fix listed |
| debian/golang-github-jackc-pgx(Debian:12) | = 4.18.3-1 | No fix listed |
| debian/golang-github-jackc-pgx(Debian:12) | = 4.18.3-1~exp0 | No fix listed |
| debian/golang-github-jackc-pgx(Debian:12) | = 4.18.3-2 | No fix listed |
| debian/golang-github-jackc-pgx(Debian:13) | < 4.18.1-2 | 4.18.1-2 |
| debian/golang-github-jackc-pgx(Debian:14) | < 4.18.1-2 | 4.18.1-2 |
Show 28 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/golang-github-jackc-pgx(Ubuntu:22.04) | All versions | No fix listed |
| jackc pgx | = < 4.18.2 | No fix listed |
| jackc pgx | = >= 5.0.0, < 5.5.4 | No fix listed |
| jackc pgx | < 4.18.2 | 4.18.2 |
| jackc pgx | >= 5.0.0, < 5.5.4 | 5.5.4 |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:24.04) | All versions | No fix listed |
| jackc github.com/jackc/pgproto3 | < 2.3.3 | 2.3.3 |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:22.04) | = 3.6.2-2 | No fix listed |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:24.04) | = 2.2.0-2 | No fix listed |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:24.04) | = 2.3.2-1 | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:24.04) | = 4.15.0-4 | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:24.04) | = 4.18.1-1 | No fix listed |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:25.10) | = 2.3.2-1 | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:25.10) | = 4.18.1-1 | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:25.10) | = 4.18.1-2 | No fix listed |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:26.10) | = 2.3.2-1 | No fix listed |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:26.10) | = 2.3.3-2 | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:26.10) | = 4.18.1-2 | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:26.10) | = 4.18.3-2 | No fix listed |
| ubuntu/golang-github-jackc-pgproto3(Ubuntu:26.04) | = 2.3.2-1 | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:26.04) | = 4.18.1-2 | No fix listed |
References
- https://github.com/jackc/pgproto3/security/advisories/GHSA-7jwh-3vrq-q3m8 issue-tracking vendor-advisory
- https://github.com/jackc/pgx/security/advisories/GHSA-mrww-27vc-gghv issue-tracking vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/jackc/pgproto3/commit/945c2126f6db8f3bea7eeebe307c01fe92bca007 issue-tracking patch
- https://github.com/jackc/pgx/commit/adbb38f298c76e283ffc7c7a3f571036fea47fd4 issue-tracking patch
- https://github.com/jackc/pgx/commit/c543134753a0c5d22881c12404025724cb05ffd8 issue-tracking patch
- https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df issue-tracking patch
- github.com product
- github.com product
- https://www.youtube.com/watch?v=Tfg1B8u1yvE press-media-coverage
- Debian Security Tracker CVE-2024-27304 vendor-advisory
- github.com
- github.com
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking
- bugs.debian.org issue-tracking