pgx SQL Injection via Line Comment Creation

Summary

CVECVE-2024-27289
StatePUBLISHED
AssignerGitHub_M
Source PriorityCVE Program / NVD first with legacy fallback
Published2024-03-06 19:15:08 UTC
Updated2026-05-21 19:57:50 UTC
Descriptionpgx 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.

Risk And Classification

Primary CVSS: v3.1 8.1 HIGH from [email protected]

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

EPSS: 0.005910000 probability, percentile 0.694360000 (date 2026-05-27)

Problem Types: CWE-89 | CWE-89 CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')


VersionSourceTypeScoreSeverityVector
3.1[email protected]Secondary8.1HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
3.1CNADECLARED8.1HIGHCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS v3.1 Breakdown

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

NVD Known Affected Configurations (CPE 2.3)

TypeVendorProductVersionUpdateEditionLanguage
Application Jackc Pgx All All All All

Vendor Declared Affected Products

SourceVendorProductVersionPlatforms
CNA Jackc Pgx affected < 4.18.2 Not specified
ADP Jackc Pgx affected 4.18.2 custom Not specified

References

ReferenceSourceLinkTags
github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df af854a3a-2127-422b-91ae-364da2661108 github.com Patch
github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p af854a3a-2127-422b-91ae-364da2661108 github.com Vendor Advisory
www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw af854a3a-2127-422b-91ae-364da2661108 www.sonarsource.com Third Party Advisory
CVE Program record CVE.ORG www.cve.org canonical
NVD vulnerability detail NVD nvd.nist.gov canonical, analysis

Legacy QID Mappings

  • 997621 GO (Go) Security Update for github.com/jackc/pgx (GHSA-m7wr-2xf7-cm9p)
© CVE.report 2026 |

Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

Free CVE JSON API cve.report/api

CVE.report and Source URL Uptime Status status.cve.report