GHSA-wpvf-5mc3-hv6m: Duplicate Advisory Querydsl SQL/HQL Injection Vulnerability

CRITICAL
CVSS 9.8
CWE-89
Published
Advisory Summary

GHSA-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

CVE Identifier N/A
GHSA Identifier GHSA-wpvf-5mc3-hv6m
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Duplicate Advisory
Package Ecosystem Maven
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (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.

com.querydsl:querydsl-jpa fixed: Latest secure release
<dependency>
    <groupId>com.querydsl</groupId>
    <artifactId>querydsl-jpa</artifactId>
    <version>Latest secure release</version>
</dependency>
com.querydsl:querydsl-apt fixed: Latest secure release
<dependency>
    <groupId>com.querydsl</groupId>
    <artifactId>querydsl-apt</artifactId>
    <version>Latest secure release</version>
</dependency>
io.github.openfeign.querydsl:querydsl-jpa fixed: Latest secure release
<dependency>
    <groupId>io.github.openfeign.querydsl</groupId>
    <artifactId>querydsl-jpa</artifactId>
    <version>Latest secure release</version>
</dependency>
io.github.openfeign.querydsl:querydsl-apt fixed: Latest secure release
<dependency>
    <groupId>io.github.openfeign.querydsl</groupId>
    <artifactId>querydsl-apt</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

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

## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-6q3q-6v5j-h6vg. This link is maintained to preserve external references. ## Original Description Querydsl 5.1.0 allows SQL/HQL injection in orderBy in JPAQuery.

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?
GHSA-wpvf-5mc3-hv6m is a security vulnerability in Duplicate Advisory involving Querydsl SQL/HQL injection under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Duplicate Advisory versions are affected?
Affected versions include releases prior to current release patches across affected packages: com.querydsl:querydsl-jpa, com.querydsl:querydsl-apt, io.github.openfeign.querydsl:querydsl-jpa, io.github.openfeign.querydsl:querydsl-apt.
What version fixes GHSA-wpvf-5mc3-hv6m?
Upgrading to current release patches (or the latest patched release for your respective branch) resolves the vulnerability.
Is querydsl-jpa affected?
Yes, com.querydsl:querydsl-jpa is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
Is querydsl-apt affected?
Yes, com.querydsl:querydsl-apt is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of GHSA-wpvf-5mc3-hv6m?
GHSA-wpvf-5mc3-hv6m has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with GHSA-wpvf-5mc3-hv6m?
GHSA-wpvf-5mc3-hv6m is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (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.).
How can I check Maven dependencies for GHSA-wpvf-5mc3-hv6m?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=com.querydsl'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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"
  }
}