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

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.

Published: 2024-03-06 Last update: 2026-05-21 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2024-27289 is rated Moderate Risk (56.7/100): CVSS High severity, with medium exploitation likelihood (EPSS 0.59%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2024-27289

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2025-12-05 0.18% 0.59% +0.41%
2 2025-11-21 0.39% 0.18% -0.21%
3 2025-11-18 0.39%

Full EPSS history (11 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2024-27289

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
8.1 3.1 HIGH
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
2.2 5.9 [email protected]

Weakness enumeration for CVE-2024-27289

GitHub Security Advisory for CVE-2024-27289

GHSA-m7wr-2xf7-cm9p · Severity: high · Ecosystem: go — pgx SQL Injection via Line Comment Creation

OS Trackers for CVE-2024-27289

vendor priority summary link
debian not yet assigned CVE-2024-27289 not yet assigned priority: Debian including 1 source packages (golang-github-jackc-pgx), 5 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 3, open 2. https://security-tracker.debian.org/tracker/CVE-2024-27289
redhat medium https://access.redhat.com/security/cve/CVE-2024-27289
ubuntu medium CVE-2024-27289 medium priority: Ubuntu including 1 source packages (golang-github-jackc-pgx), 8 status rows across 8 suites (focal, jammy, mantic, noble, oracular, plucky, questing, upstream): needs-triage 4, ignored 3, DNE 1. https://ubuntu.com/security/CVE-2024-27289

Affected software / configurations for CVE-2024-27289

Vendor Product Version Raw CPE
jackc pgx < 4.18.2 cpe:2.3:a:jackc:pgx:*:*:*:*:*:go:*:*

References for CVE-2024-27289

cvelogic Threat Intelligence