CVE-2022-22980 — spring-data-mongodb
CRITICALCVE-2022-22980 is a critical-severity (CVSS 9) Expression Language Injection vulnerability in org.springframework.data:spring-data-mongodb. 13 public exploit or proof-of-concept references are indexed, so weaponization risk is real. A fix is available for org.springframework.data:spring-data-mongodb — see the affected versions and patch details below.
SpEL Injection in Spring Data MongoDB
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-mongodb☕org.springframework.data:spring-data-mongodbReal-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
A Spring Data MongoDB application is vulnerable to SpEL Injection when using @Query or @Aggregation-annotated query methods with SpEL expressions that contain query parameter placeholders for value binding if the input is not sanitized.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.springframework.data:spring-data-mongodb | ≥ 3.4.0&&< 3.4.1 | 3.4.1org.springframework.data:spring-data-mongodb:3.4.1 |
| ☕Maven | org.springframework.data:spring-data-mongodb | all versions | 3.3.5org.springframework.data:spring-data-mongodb:3.3.5 |
Affected Products
spring data mongodbvmwareResearch use only. For defensive security, authorized penetration testing, and academic research only. Never execute exploit code against systems without explicit written authorization.
A Spring Data MongoDB application is vulnerable to SpEL Injection when u…
Report on github.com
Report on github.com
Report on github.com
Report on github.com
Report on github.com
Report on github.com
Detection & 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-mongodb, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.springframework.data:spring-data-mongodb to 3.4.1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2022-22980 is resolved across your whole dependency graph.
Workarounds
Stop passing untrusted input into the interpreter or shell: call the affected binary with an argument array rather than a composed command string, reject anything outside a strict allowlist of expected values, and run the component under an account that cannot reach beyond the work it legitimately does.
Frequently Asked Questions
Is CVE-2022-22980 in your dependencies?
Find it across Maven, including transitive dependencies.