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

- Priority: **Prioritise**
- Reason: Severe, CVSS 8.1 (CVE.org); no exploitation reported by the 5 checked sources; EPSS 1% (FIRST, 04-12-2026)
- Next step: Check applicability: affected before 4.18.2 (CNA); fix release not confirmed
- Status: published
- Published: 2024-03-06 · Modified: 2025-06-12
- Aliases: UBUNTU-CVE-2024-27289, DEBIAN-CVE-2024-27289, CGA-3hc6-f39f-v3rw, CGA-56v6-vmr7-mjc7, CGA-5w6w-5997-hqwf, CGA-79hh-prvp-3rg9, CGA-7m9q-9p6r-cpv7, CGA-853q-xmcr-jv5g, CGA-8g64-wq5q-f7cv, CGA-cwq3-283w-cx2v, CGA-f7f6-r4jg-jhx2, CGA-frqp-8pqr-jm55, CGA-g99h-p9pr-4w8x, CGA-gf6p-fw74-wv64, CGA-gpr8-c22f-7956, CGA-hrwg-mgwj-5v8r, CGA-jf47-23v2-7v5c, CGA-jx6g-7qq5-x349, CGA-mpp7-wj9f-xr9f, CGA-pjv7-247w-59p2, CGA-pp26-h37r-wh9j, CGA-ppwm-7mvj-7v9h, CGA-v8h4-xw4v-3r7p, CGA-wrjp-w6g3-3852, CGA-wwhh-xw8g-4pww, CGA-xc2g-mq75-hqx3, GHSA-m7wr-2xf7-cm9p, GO-2024-2605, CGA-526m-r444-j3mg, CGA-674f-7v7f-5v4g, CGA-7m78-46q5-jc37, CGA-c3vc-vxfv-c9vv, CGA-c9mv-3xvw-7mf3, CGA-hgff-wgj3-vh48, CGA-j5r5-gq4c-48qw, CGA-jgfg-ggqv-vx7q, CGA-ph8g-wg2r-gxv4, CGA-prcw-8657-c7q8, CGA-q3vv-vg57-7x4j, CGA-r384-jhwg-wr86, CGA-w678-hfjc-2mr9, CGA-xcwm-76g8-354f
- Record: https://cvemate.com/vulnerability/CVE-2024-27289 · JSON: https://cvemate.com/vulnerability/CVE-2024-27289/json

## Description

```text
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.
```

## Signals

- CVSS: 8.1 high (v3.1, CVE.org) CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.847%, percentile 59.363%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 36)

- chainguard argo-workflows (Chainguard): \< 3.5.5-r3
- chainguard argo-workflows-fips (Chainguard): \< 3.5.5-r2
- chainguard caddy (Chainguard): \< 2.7.6-r4
- chainguard caddy-fips (Chainguard): \< 2.7.6-r1
- chainguard caddy-man (Chainguard): \< 2.7.6-r4
- chainguard caddy-src (Chainguard): \< 2.7.6-r4
- chainguard kots (Chainguard): \< 1.108.1-r0
- chainguard kots-compat (Chainguard): \< 1.108.1-r0
- chainguard kots-symlink-compat (Chainguard): \< 1.108.1-r0
- chainguard step (Chainguard): \< 0.28.6-r0
- chainguard step-ca (Chainguard): \< 0.25.2-r5
- chainguard trillian (Chainguard): \< 1.6.0-r2
- chainguard trillian-fips (Chainguard): \< 1.6.0-r2
- chainguard trillian-fips-logserver (Chainguard): \< 1.6.0-r2
- chainguard trillian-fips-logsigner (Chainguard): \< 1.6.0-r2
- chainguard trillian-logserver (Chainguard): \< 1.6.0-r2
- chainguard trillian-logsigner (Chainguard): \< 1.6.0-r2
- chainguard wavefront-collector-for-kubernetes-1.12 (Chainguard): \< 1.12.1-r9
- chainguard wavefront-collector-for-kubernetes-1.13 (Chainguard): \< 1.13.0-r9
- wolfi argo-workflows (Wolfi): \< 3.5.5-r3

## References

- <https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p>
- <https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df>
- <https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/>
- <https://ubuntu.com/security/CVE-2024-27289>
- <https://github.com/jackc/pgx/commit/826a89229b8b1cdf18e4190afa437d3df9901b9c>
- <https://www.cve.org/CVERecord?id=CVE-2024-27289>
- <https://security-tracker.debian.org/tracker/CVE-2024-27289>
- <https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27289.json>
- <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>

---

Data as of 2026-12-05T10:41:33.437Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
