CVEfocus › CVE database › CVE-2024-27289

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

CVSS 8.1 HighEPSS 1.2% (higher than 67% of CVEs)Published 2024-03-06Updated 2025-06-12Assigner: GitHub_M

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.

CWE-89

What to do

Fixed builds are available from Debian, Go: see the table below for the fixed version per release.

Debian, Red Hat, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

4Fixed
5Fix pending
3Under investigation
9Will not fix

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10golang-github-jackc-pgxFix pendingUBUNTU-CVE-2024-27289
Ubuntu 26.04golang-github-jackc-pgxUnder investigationUBUNTU-CVE-2024-27289
Ubuntu 25.10golang-github-jackc-pgxWill not fix
Ubuntu decided not to fix this in this release
UBUNTU-CVE-2024-27289
Ubuntu 24.04golang-github-jackc-pgxUnder investigationUBUNTU-CVE-2024-27289
Ubuntu 22.04golang-github-jackc-pgxUnder investigationUBUNTU-CVE-2024-27289
Debian 14golang-github-jackc-pgxFixed4.18.1-2DEBIAN-CVE-2024-27289
Debian 13golang-github-jackc-pgxFixed4.18.1-2DEBIAN-CVE-2024-27289
Debian 12golang-github-jackc-pgxFix pendingDEBIAN-CVE-2024-27289
Red Hat Enterprise Linux 10osbuild-composerFix pending
Affected
Red Hat Enterprise Linux 10osbuild-composer-coreFix pending
Affected
Red Hat Enterprise Linux 10osbuild-composer-workerFix pending
Affected
Red Hat Enterprise Linux 9osbuild-composerWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-coreWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-dnf-jsonWill not fix
Will not fix
Red Hat Enterprise Linux 9osbuild-composer-workerWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composerWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-coreWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-dnf-jsonWill not fix
Will not fix
Red Hat Enterprise Linux 8osbuild-composer-workerWill not fix
Will not fix
Go librarygithub.com/jackc/pgxFixed4.18.2GHSA-m7wr-2xf7-cm9p
Go librarygithub.com/jackc/pgx/v4Fixed4.18.2GHSA-m7wr-2xf7-cm9p

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.