Skip to content

CVE-2024-27289 pgx SQL Injection via Line Comment Creation

HighCVSS 8.1 EPSS 0.85%
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.

PackageAffectedFixed inStatus
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

ProductAffected versionsFixed 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
ProductAffected versionsFixed in
ubuntu/golang-github-jackc-pgx(Ubuntu:26.04) = 4.18.1-2 No fix listed

References