GHSA-xfg6-62px-cxc2: Duplicate Advisory SQL Injection Vulnerability
CRITICALGHSA-xfg6-62px-cxc2 is a CRITICAL (CVSS 10.0) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Duplicate Advisory libraries in the Maven ecosystem. The issue involves sql injection in pgjdbc. Remediation is available by upgrading affected packages to version 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, 42.2.8.
GHSA-xfg6-62px-cxc2 at a Glance
Security Impact
CVSS: 10.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H).
How to Fix GHSA-xfg6-62px-cxc2
To remediate this vulnerability, upgrade all affected Duplicate Advisory dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.2</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.6.1</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.5.5</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.4.4</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.9</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.8</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.postgresql
How to Check if You Are Affected
To determine whether your Java application is affected by GHSA-xfg6-62px-cxc2, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.postgresql
Analyze the terminal output to locate any version of Duplicate Advisory in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 42.7.2), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.postgresql command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Duplicate Advisory, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-xfg6-62px-cxc2 Affected Duplicate Advisory Versions
6 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.postgresql:postgresql
|
Maven |
≥ 42.7.0
< 42.7.2
|
42.7.2
|
|
org.postgresql:postgresql
|
Maven |
≥ 42.6.0
< 42.6.1
|
42.6.1
|
|
org.postgresql:postgresql
|
Maven |
≥ 42.5.0
< 42.5.5
|
42.5.5
|
|
org.postgresql:postgresql
|
Maven |
≥ 42.4.0
< 42.4.4
|
42.4.4
|
|
org.postgresql:postgresql
|
Maven |
≥ 42.3.0
< 42.3.9
|
42.3.9
|
|
org.postgresql:postgresql
|
Maven |
< 42.2.8
|
42.2.8
|
References
Frequently Asked Questions
What is GHSA-xfg6-62px-cxc2?
Which Duplicate Advisory versions are affected?
What version fixes GHSA-xfg6-62px-cxc2?
Is postgresql affected?
What is the CVSS score of GHSA-xfg6-62px-cxc2?
What CWE is associated with GHSA-xfg6-62px-cxc2?
How can I check Maven dependencies for GHSA-xfg6-62px-cxc2?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-xfg6-62px-cxc2",
"modified" : "2024-06-10T18:30:52Z",
"published" : "2024-02-19T15:30:38Z",
"withdrawn" : "2024-02-21T23:18:25Z",
"aliases" : [ ],
"summary" : "Duplicate Advisory: SQL injection in pgjdbc",
"details" : "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-24rp-q3w6-vc56. This link is maintained to preserve external references.\n\n## Original Description\npgjdbc, the PostgreSQL JDBC Driver, allows attacker to inject SQL if using PreferQueryMode=SIMPLE. Note this is not the default. In the default mode there is no vulnerability. 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. By constructing a matching string payload, the attacker can inject SQL to alter the query,bypassing the protections that parameterized queries bring against SQL Injection attacks. Versions before 42.7.2, 42.6.1, 42.5.5, 42.4.4, 42.3.9, and 42.2.8 are affected.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.postgresql:postgresql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "42.7.0"
}, {
"fixed" : "42.7.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.postgresql:postgresql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "42.6.0"
}, {
"fixed" : "42.6.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.postgresql:postgresql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "42.5.0"
}, {
"fixed" : "42.5.5"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.postgresql:postgresql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "42.4.0"
}, {
"fixed" : "42.4.4"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.postgresql:postgresql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "42.3.0"
}, {
"fixed" : "42.3.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "org.postgresql:postgresql"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "42.2.8"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pgjdbc/pgjdbc/security/advisories/GHSA-24rp-q3w6-vc56"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-1597"
}, {
"type" : "WEB",
"url" : "https://github.com/pgjdbc/pgjdbc/commit/06abfb78a627277a580d4df825f210e96a4e14ee"
}, {
"type" : "WEB",
"url" : "https://github.com/pgjdbc/pgjdbc/commit/93b0fcb2711d9c1e3a2a03134369738a02a58b40"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pgjdbc/pgjdbc"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2024/05/msg00007.html"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/TZQTSMESZD2RJ5XBPSXH3TIQVUW5DIUU"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20240419-0008"
}, {
"type" : "WEB",
"url" : "https://www.enterprisedb.com/docs/jdbc_connector/latest/01_jdbc_rel_notes"
}, {
"type" : "WEB",
"url" : "https://www.enterprisedb.com/docs/security/assessments/cve-2024-1597"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/04/02/6"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-21T00:04:53Z",
"nvd_published_at" : "2024-02-19T13:15:07Z"
}
}