CVE-2024-27289 pgx SQL Injection via Line Comment Creation
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: total
- Technology
- UbuntuDebian
Description
pgx is a PostgreSQL driver and toolkit for Go. Prior to version 4.18.2, SQL injection can occur when all of the following conditions are met: the non-default simple protocol is used; a placeholder for a numeric value must be immediately preceded by a minus; there must be a second placeholder for a string value after the first placeholder; both must be on the same line; and both parameter values must be user-controlled. The problem is resolved in v4.18.2. As a workaround, do not use the simple protocol or do not place a minus directly before a placeholder.
Upgrade path
10 packages: 3 fixed, 1 partially fixed, 6 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| 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-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; All versions | 4.18.2 | Partially 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 pgx | < 4.18.2; = < 4.18.2 | 4.18.2 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| jackc pgx(Go) | < 4.18.2 | 4.18.2 |
| jackc pgx(Go) | All versions | 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 |
| ubuntu/golang-github-jackc-pgx(Ubuntu:22.04) | All versions | No fix listed |
| jackc pgx | = < 4.18.2 | No fix listed |
| jackc pgx | < 4.18.2 | 4.18.2 |
| ubuntu/golang-github-jackc-pgx(Ubuntu:24.04) | All versions | No fix listed |
| ubuntu/golang-github-jackc-pgx(Ubuntu:26.04) | 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-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-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-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 |
Show 1 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/golang-github-jackc-pgx(Ubuntu:26.04) | = 4.18.1-2 | No fix listed |
References
- https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p issue-tracking vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df issue-tracking patch
- github.com product
- www.sonarsource.com third-party-advisory
- Debian Security Tracker CVE-2024-27289 vendor-advisory
- github.com
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking
- github.com issue-tracking