GHSA-wpvf-5mc3-hv6m: Duplicate Advisory Querydsl SQL/HQL Injection Vulnerability
CRITICALGHSA-wpvf-5mc3-hv6m is a CRITICAL (CVSS 9.8) querydsl sql/hql 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 querydsl sql/hql injection. Remediation is available in the latest vendor maintenance releases.
GHSA-wpvf-5mc3-hv6m at a Glance
Security Impact
CVSS: 9.8
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:U/C:H/I:H/A:H).
How to Fix GHSA-wpvf-5mc3-hv6m
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>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>Latest secure release</version>
</dependency>
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>Latest secure release</version>
</dependency>
<dependency>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<version>Latest secure release</version>
</dependency>
<dependency>
<groupId>io.github.openfeign.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>Latest secure release</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=com.querydsl
How to Check if You Are Affected
To determine whether your Java application is affected by GHSA-wpvf-5mc3-hv6m, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=com.querydsl
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 the patched release), your application is affected.
Note: The mvn dependency:tree -Dincludes=com.querydsl 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-wpvf-5mc3-hv6m Affected Duplicate Advisory Versions
4 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
com.querydsl:querydsl-jpa
|
Maven |
≤ 5.1.0
|
|
|
com.querydsl:querydsl-apt
|
Maven |
≤ 5.1.0
|
|
|
io.github.openfeign.querydsl:querydsl-jpa
|
Maven |
≤ 6.8
|
|
|
io.github.openfeign.querydsl:querydsl-apt
|
Maven |
≤ 6.8
|
|
References
Frequently Asked Questions
What is GHSA-wpvf-5mc3-hv6m?
Which Duplicate Advisory versions are affected?
What version fixes GHSA-wpvf-5mc3-hv6m?
Is querydsl-jpa affected?
Is querydsl-apt affected?
What is the CVSS score of GHSA-wpvf-5mc3-hv6m?
What CWE is associated with GHSA-wpvf-5mc3-hv6m?
How can I check Maven dependencies for GHSA-wpvf-5mc3-hv6m?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-wpvf-5mc3-hv6m",
"modified" : "2024-12-03T18:54:02Z",
"published" : "2024-11-20T21:30:50Z",
"withdrawn" : "2024-11-27T17:20:58Z",
"aliases" : [ ],
"summary" : "Duplicate Advisory: Querydsl SQL/HQL injection",
"details" : "## Duplicate Advisory\nThis advisory has been withdrawn because it is a duplicate of GHSA-6q3q-6v5j-h6vg. This link is maintained to preserve external references.\n\n## Original Description\nQuerydsl 5.1.0 allows SQL/HQL injection in orderBy in JPAQuery.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "com.querydsl:querydsl-jpa"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "5.1.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "com.querydsl:querydsl-apt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "5.1.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "io.github.openfeign.querydsl:querydsl-jpa"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "6.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "io.github.openfeign.querydsl:querydsl-apt"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "6.8"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-49203"
}, {
"type" : "WEB",
"url" : "https://github.com/querydsl/querydsl/issues/3757"
}, {
"type" : "WEB",
"url" : "https://github.com/CSIRTTrizna/CVE-2024-49203"
}, {
"type" : "WEB",
"url" : "https://github.com/OpenFeign/querydsl"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/querydsl/querydsl"
}, {
"type" : "WEB",
"url" : "https://github.com/querydsl/querydsl/releases/tag/QUERYDSL_5_1_0"
}, {
"type" : "WEB",
"url" : "https://www.csirt.sk/querydsl-java-library-vulnerability-permits-sql-hql-injection.html"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-11-21T22:23:12Z",
"nvd_published_at" : "2024-11-20T21:15:08Z"
}
}