CVE-2024-27289Jackc Pgx
High 8.1 No auth needed
Follow: this CVE · Jackc · Jackc Pgx We alert you by email or Slack (account required).
- Priority
- 64
- CVSS 3.1
- 8.1
- EPSS
- 1.2% probability of exploitation in 30 days · percentile 67
- Auth required
- No
- Published
- Mar 6, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-89
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Pgx.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/jackc/pgx |
< 4.18.2 |
4.18.2 |
go get github.com/jackc/pgx@v4.18.2 |
| Go | github.com/jackc/pgx |
all |
no fixed version | — |
| Go | github.com/jackc/pgx/v4 |
< 4.18.2 |
4.18.2 |
go get github.com/jackc/pgx/v4@v4.18.2 |
| Go | github.com/jackc/pgx/v4 |
< 4.18.2 |
4.18.2 |
go get github.com/jackc/pgx/v4@v4.18.2 |
Per OSV / GitHub Advisories (GHSA-m7wr-2xf7-cm9p, GO-2024-2605). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| jackc | pgx | < 4.18.2 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Vendor Advisory
- www.sonarsource.com Third Party Advisory