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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| jackc | pgx | < 4.18.2 | — |
Fixed in Linux distributions
Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | golang-github-jackc-pgx | 4.18.1-2 | — |
| Debian 13 | golang-github-jackc-pgx | 4.18.1-2 | — |
| Debian 12 | golang-github-jackc-pgx | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 26.10 | golang-github-jackc-pgx | No fix yet | — |
| Ubuntu 26.04 LTS | golang-github-jackc-pgx | No fix yet | — |
| Ubuntu 25.10 | golang-github-jackc-pgx | No fix yet | — |
| Ubuntu 24.04 LTS | golang-github-jackc-pgx | No fix yet | — |
| Ubuntu 22.04 LTS | golang-github-jackc-pgx | No fix yet | — |
Azure Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | telegraf | 1.31.0-1 | — |
| Azure Linux 2 (CBL-Mariner) | telegraf | 1.29.4-4 | — |
Wolfi
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | argo-workflows | 3.5.5-r3 | — |
| Wolfi rolling | caddy +2 | 2.7.6-r4 | — |
| Wolfi rolling | kots +2 | 1.108.1-r0 | — |
| Wolfi rolling | step | 0.28.6-r0 | — |
| Wolfi rolling | step-ca | 0.25.2-r5 | — |
| Wolfi rolling | trillian +2 | 1.6.0-r2 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Go | github.com/jackc/pgx | < 4.18.2 | 4.18.2 | GHSA-m7wr-2xf7-cm9p |
| Go | github.com/jackc/pgx | all versions | — | GO-2024-2605 |
| Go | github.com/jackc/pgx/v4 | < 4.18.2 | 4.18.2 | GHSA-m7wr-2xf7-cm9p |
Advisories 1
- WID-SEC-2024-0626 Red Hat Enterprise Linux: Mehrere Schwachstellen ermöglichen Manipulation von Dateien BSI CERT-Bund (WID) · Oct 16, 2024