Querydsl vulnerable to HQL injection through orderBy
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| io.github.openfeign.querydsl:querydsl-jpa Maven |
|
|
| io.github.openfeign.querydsl:querydsl-apt Maven |
|
| Product | Affected | Fixed in |
|---|---|---|
| io.github.openfeign.querydsl:querydsl-jpa Maven |
|
|
| io.github.openfeign.querydsl:querydsl-apt Maven |
|
|
| com.querydsl:querydsl-jpa Maven |
| No fix yet |
| com.querydsl:querydsl-apt Maven |
| No fix yet |
Querydsl 5.1.0 and OpenFeign Querydsl 6.8 allows SQL/HQL injection in orderBy in JPAQuery. NOTE: this is disputed by a Querydsl community member because the product is not intended to defend against a developer who uses untrusted input directly in query construction.
From the CVE record · mitre
Querydsl’s JPAQuery orderBy can allow SQL/HQL injection when an application uses untrusted input directly in query construction. An attacker who can influence that input may alter the query; the report is disputed, and the input does not specify whether network access or authentication is required.
Check applications using Maven io.github.openfeign.querydsl:querydsl-jpa or querydsl-apt versions below 5.6.1 or from 6.0.0.M1 to before 6.10.1, or com.querydsl:querydsl-jpa or querydsl-apt versions through 5.1.0.