CVE-2016-6652 — spring-data-jpa
MEDIUMCVE-2016-6652 is a medium-severity (CVSS 5.6) SQL Injection vulnerability in org.springframework.data:spring-data-jpa. A fix is available for org.springframework.data:spring-data-jpa — see the affected versions and patch details below.
Improper Neutralization of Special Elements used in an SQL Command Pivotal Spring Data JPA
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
Where this sits among everything scored
Real-World Exposure
org.springframework.data:spring-data-jpa☕org.springframework.data:spring-data-jpaReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
SQL injection vulnerability in Pivotal Spring Data JPA before 1.9.6 (Gosling SR6) and 1.10.x before 1.10.4 (Hopper SR4), when used with a repository that defines a String query using the @Query annotation, allows attackers to execute arbitrary JPQL commands via a sort instance with a function call.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.springframework.data:spring-data-jpa | all versions | 1.9.6org.springframework.data:spring-data-jpa:1.9.6 |
| ☕Maven | org.springframework.data:spring-data-jpa | ≥ 1.10.0&&< 1.10.4 | 1.10.4org.springframework.data:spring-data-jpa:1.10.4 |
Affected Products
spring data jpapivotal_softwareDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.springframework.data:spring-data-jpa, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.springframework.data:spring-data-jpa to 1.9.6 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2016-6652 is resolved across your whole dependency graph.
Workarounds
Until you can upgrade, make sure every query built from user input uses parameterised statements or a prepared-statement API rather than string concatenation, and reduce the database account's privileges so an injected query cannot read or alter data beyond what the feature needs.
Frequently Asked Questions
Is CVE-2016-6652 in your dependencies?
Find it across Maven, including transitive dependencies.