Read the docs
TI-2024-18128 Aliases CVE-2024-27289GHSA-m7wr-2xf7-cm9p

pgx SQL Injection via Line Comment Creation

Priority HIGH 70CWE-89Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
None
Attack complexity
High
Impact type
SQL injection
Confidentiality · integrity · availability
High · High · High
Fix status
Partial Red Hat: 3 fixed, 9 without a fix

Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-89.

Summary

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00847 58th percentileScored 2026-11-07
Fix Partial pgx (jackc): 4.18.2github.com/jackc/pgx (Go): 4.18.2+1 more productRed Hat: 3 advisoriesRed Hat: 3 fixed, 9 without a fix

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Total

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
jackcpgxbefore 4.18.24.18.2Patch availableCNA
—github.com/jackc/pgx (Go)before 4.18.24.18.2Patch availableGHSA-m7wr-2xf7-cm9p
—github.com/jackc/pgx/v4 (Go)before 4.18.24.18.2Patch availableGHSA-m7wr-2xf7-cm9p
  • pgx Vendorjackc Affected before 4.18.2 Fixed in 4.18.2 Patch available CNA
  • github.com/jackc/pgx (Go) Vendor— Affected before 4.18.2 Fixed in 4.18.2 Patch available GHSA-m7wr-2xf7-cm9p
  • github.com/jackc/pgx/v4 (Go) Vendor— Affected before 4.18.2 Fixed in 4.18.2 Patch available GHSA-m7wr-2xf7-cm9p

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:jackc:pgx:*:*:*:*:*:go:*:*before 4.18.2Vulnerablejackc
  • cpe:2.3:a:jackc:pgx:*:*:*:*:*:go:*:* Versions before 4.18.2 Vulnerable ·jackc

Remediation

  • Fix · CNA pgx (jackc) Fixed in 4.18.2
  • Fix · GHSA-m7wr-2xf7-cm9p github.com/jackc/pgx (Go) Fixed in 4.18.2 Advisory →
  • Fix · GHSA-m7wr-2xf7-cm9p github.com/jackc/pgx/v4 (Go) Fixed in 4.18.2 Advisory →

Red Hat 3 advisories

  • RHSA-2024:7944 Released 2024-10-16 · Red Hat rating Moderate
    OpenShift Container Platform 4.16.17 security update
    • Red Hat OpenShift Container Platform 4.16 openshift4/ose-agent-installer-csr-approver-rhel9
  • RHSA-2024:7922 Released 2024-10-16 · Red Hat rating Important
    OpenShift Container Platform 4.17.1 bug fix and security update
    • Red Hat OpenShift Container Platform 4.17 openshift4/aws-kms-encryption-provider-rhel9, openshift4/azure-kms-encryption-provider-rhel9, openshift4/cloud-network-config-controller-rhel9 +47
  • RHSA-2024:1321 Released 2024-03-13 · Red Hat rating Moderate
    ACS 4.3 enhancement and security update
    • RHACS 4.3 for RHEL 8 advanced-cluster-security/rhacs-central-db-rhel8, advanced-cluster-security/rhacs-collector-rhel8, advanced-cluster-security/rhacs-collector-slim-rhel8 +8

Vendor assessments

Red Hat

Red Hat rating: Moderate. Red Hat's page for this CVE →

ProductStatusPlan or fix
Multicluster Engine for KubernetesAffectedNo fix yet
Red Hat Advanced Cluster Security 3AffectedNo fix planned: Will not fix
Red Hat Ansible Automation Platform 2AffectedNo fix planned: Will not fix
Red Hat Enterprise Linux 10AffectedNo fix yet
Red Hat Enterprise Linux 8AffectedNo fix planned: Will not fix
Red Hat Enterprise Linux 9AffectedNo fix planned: Will not fix
Red Hat OpenShift Container Platform 4AffectedNo fix yet
Red Hat OpenShift Container Platform Assisted Installer 1AffectedNo fix yet
Red Hat Quay 3AffectedNo fix yet
RHACS 4.3 for RHEL 8Fixed RHSA-2024:1321
Red Hat OpenShift Container Platform 4.16Fixed RHSA-2024:7944
Red Hat OpenShift Container Platform 4.17Fixed RHSA-2024:7922
Not affected: 5 products
  • Multicluster Engine for Kubernetes
  • Red Hat Advanced Cluster Management for Kubernetes 2
  • Red Hat OpenShift Container Platform 4.16
  • Red Hat OpenShift Container Platform 4.17
  • Red Hat OpenStack Platform 16.2

Timeline

  1. 2026-10-02 Threatist record created from CVE-2024-27289
  2. 2026-10-03 Alias added: GHSA-m7wr-2xf7-cm9p

References

  • TI-2026-26188 CVE-2026-33816 in github.com/jackc/pgx CVSS 3.1CRITICAL 9.8
  • TI-2026-26187 CVE-2026-33815 in github.com/jackc/pgx CVSS 3.1CRITICAL 9.8
  • TI-2024-18142 pgx SQL Injection via Protocol Message Size Overflow CVSS 3.1CRITICAL 9.8
  • TI-2026-30292 pgx: SQL Injection via placeholder confusion with dollar quoted string literals CVSS 4.0LOW 2.3

Sources