CVE-2024-27289
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.
Predictions
Heuristic predictions, AS-IS, for prioritization only.
Mitigations
Vendor advisory: debian — https://security-tracker.debian.org/tracker/CVE-2024-27289
Vendor advisory: security-advisories@github.com — https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p
Vendor advisory: security-advisories@github.com — https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df
OS impact
| OS | Version | Status | Fixed in |
|---|---|---|---|
| debian | bookworm | affected | |
| debian | bullseye | affected | |
| debian | forky | fixed | 4.18.1-2 |
| debian | sid | fixed | 4.18.1-2 |
| debian | trixie | fixed | 4.18.1-2 |
Package impact
| Ecosystem | Package | Vulnerable | Fixed |
|---|---|---|---|
| Go | github.com/jackc/pgx | <4.18.2 | 4.18.2 |
| Go | github.com/jackc/pgx/v4 | <4.18.2 | 4.18.2 |
| Go | github.com/jackc/pgx | | |
Application impact
| Vendor | Product | Versions | Fixed |
|---|---|---|---|
| jackc | pgx | {"endExcluding":"4.18.2"} | 4.18.2 |
References
- https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df
- https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p
- https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/
- https://nvd.nist.gov/vuln/detail/CVE-2024-27289
- https://github.com/jackc/pgx
- https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw
- https://security-tracker.debian.org/tracker/CVE-2024-27289
CWEs
CWE-89
Verify integrity in audit chain (admin only). AS-IS.