cve.bz

CVE-2024-27289 jackc pgx: SQL Injection

8.1 highEPSS 0.8%Fix available

High (8.1) in jackc pgx. EPSS 0.8% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/jackc/pgx 4.18.2.

On this page
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.

Severity

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.8% (unchanged from 0.8% a week ago; 0.8% 30 days ago) estimated probability of exploitation activity in the next 30 days; 59th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-07-24. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-89 Improper Neutralization of Special Elements used in an SQL Command (SQL Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-27289 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-27289?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-27289?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-27289 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
jackc:pgxbefore 4.18.2

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-m7wr-2xf7-cm9pGogithub.com/jackc/pgx<4.18.24.18.2
GHSA-m7wr-2xf7-cm9pGogithub.com/jackc/pgx/v4<4.18.24.18.2
GO-2024-2605Gogithub.com/jackc/pgxall versionsno fix published
GO-2024-2605Gogithub.com/jackc/pgx/v4<4.18.24.18.2

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12golang-github-jackc-pgxno fix listedDEBIAN-CVE-2024-27289
Debian13, 14golang-github-jackc-pgx4.18.1-2DEBIAN-CVE-2024-27289
Ubuntu22.04:LTS, 24.04:LTS, 25.10 and 2 moregolang-github-jackc-pgxno fix listedUBUNTU-CVE-2024-27289
Azure Linux2telegraf1.29.4-4AZL-35763
Azure Linux3telegraf1.31.0-1AZL-35750

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Microsoft's Azure Linux vulnerability data, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu.

Red Hat

Red Hat rates this Moderate.

Red Hat's mitigation

A possible mitigation is to not use the simple protocol or do not place a minus directly before a placeholder.

ProductPackageStateAdvisory
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-central-db-rhel8:4.3.5-3Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-collector-rhel8:4.3.5-3Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-collector-slim-rhel8:4.3.5-1Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-main-rhel8:4.3.5-4Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-operator-bundle:4.3.5-4Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-rhel8-operator:4.3.5-3Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-roxctl-rhel8:4.3.5-3Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-scanner-db-rhel8:4.3.5-3Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-scanner-db-slim-rhel8:4.3.5-1Fixed 2024-03-13RHSA-2024:1321
Red Hat Advanced Cluster Security 4.3advanced-cluster-security/rhacs-scanner-rhel8:4.3.5-3Fixed 2024-03-13RHSA-2024:1321
Multicluster Engine for Kubernetesmulticluster-engine/agent-service-rhel8Affected
Multicluster Engine for Kubernetesmulticluster-engine/assisted-installer-agent-rhel8Affected
Multicluster Engine for Kubernetesmulticluster-engine/assisted-installer-reporter-rhel8Not affected
Multicluster Engine for Kubernetesmulticluster-engine/assisted-installer-rhel8Will not fix
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/acm-search-indexer-rhel9Not affected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/acm-search-v2-api-rhel9Not affected
Red Hat Advanced Cluster Security 3advanced-cluster-security/rhacs-central-db-rhel8Out of support scope
Red Hat Advanced Cluster Security 3advanced-cluster-security/rhacs-main-rhel8Will not fix
Red Hat Advanced Cluster Security 3advanced-cluster-security/rhacs-rhel8-operatorOut of support scope
Red Hat Advanced Cluster Security 3advanced-cluster-security/rhacs-roxctl-rhel8Out of support scope
15 more in the JSON and on Red Hat's page.

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-27289.

Attack patterns (CAPEC)

  • CAPEC-7 Blind SQL Injection Likelihood: High · Severity: High
  • CAPEC-66 SQL Injection Likelihood: High · Severity: High
  • CAPEC-108 Command Line Execution through SQL Injection Likelihood: Low · Severity: Very High
  • CAPEC-109 Object Relational Mapping Injection Likelihood: Low · Severity: High
  • CAPEC-110 SQL Injection through SOAP Parameter Tampering Likelihood: High · Severity: Very High
  • CAPEC-470 Expanding Control over the Operating System from the Database Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON