CVE-2024-27289
pgx SQL Injection via Line Comment Creation
Description
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.
INFO
Published Date :
March 6, 2024, 7:15 p.m.
Last Modified :
June 12, 2025, 4:15 p.m.
Remotely Exploit :
Yes !
Source :
[email protected]
Affected Products
The following products are affected by CVE-2024-27289
vulnerability.
Even if cvefeed.io
is aware of the exact versions of the
products
that
are
affected, the information is not represented in the table below.
No affected product recoded yet
CVSS Scores
Score | Version | Severity | Vector | Exploitability Score | Impact Score | Source |
---|---|---|---|---|---|---|
CVSS 3.1 | HIGH | [email protected] |
Solution
- There is no known solution at this time.
References to Advisories, Solutions, and Tools
Here, you will find a curated list of external links that provide in-depth
information, practical solutions, and valuable tools related to
CVE-2024-27289
.
CWE - Common Weakness Enumeration
While CVE identifies
specific instances of vulnerabilities, CWE categorizes the common flaws or
weaknesses that can lead to vulnerabilities. CVE-2024-27289
is
associated with the following CWEs:
Common Attack Pattern Enumeration and Classification (CAPEC)
Common Attack Pattern Enumeration and Classification
(CAPEC)
stores attack patterns, which are descriptions of the common attributes and
approaches employed by adversaries to exploit the CVE-2024-27289
weaknesses.
We scan GitHub repositories to detect new proof-of-concept exploits. Following list is a collection of public exploits and proof-of-concepts, which have been published on GitHub (sorted by the most recently updated).
Results are limited to the first 15 repositories due to potential performance issues.
The following list is the news that have been mention
CVE-2024-27289
vulnerability anywhere in the article.
The following table lists the changes that have been made to the
CVE-2024-27289
vulnerability over time.
Vulnerability history details can be useful for understanding the evolution of a vulnerability, and for identifying the most recent changes that may impact the vulnerability's severity, exploitability, or other characteristics.
-
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Jun. 12, 2025
Action Type Old Value New Value Added Reference https://www.sonarsource.com/blog/double-dash-double-trouble-a-subtle-sql-injection-flaw/ -
CVE Modified by af854a3a-2127-422b-91ae-364da2661108
Nov. 21, 2024
Action Type Old Value New Value Added Reference https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df Added Reference https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p -
CVE Modified by [email protected]
May. 14, 2024
Action Type Old Value New Value -
CVE Received by [email protected]
Mar. 06, 2024
Action Type Old Value New Value Added Description 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. Added Reference GitHub, Inc. https://github.com/jackc/pgx/security/advisories/GHSA-m7wr-2xf7-cm9p [No types assigned] Added Reference GitHub, Inc. https://github.com/jackc/pgx/commit/f94eb0e2f96782042c96801b5ac448f44f0a81df [No types assigned] Added CWE GitHub, Inc. CWE-89 Added CVSS V3.1 GitHub, Inc. AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H