QID 376684
QID 376684: Spring Data MongoDB SpEL Expression Injection Vulnerability
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.
Specifically, an application is vulnerable when all of the following are true:
- A repository query method is annotated with @Query or @Aggregation
- The annotated query or aggregation value/pipeline contains SpEL parts using the parameter placeholder syntax within the expression
- The user supplied input is not sanitized by the application
Spring Data MongoDB:
- 3.4.0
- 3.3.0 to 3.3.4
- Older, unsupported versions are also affected
A remote attacker can execute arbitrary code on the target system. Successful exploitation of this vulnerability may result in a complete compromise of a vulnerable system.
Solution
Users of affected versions should apply the following mitigation: 3.4.x users should upgrade to 3.4.1+. 3.3.x users should upgrade to 3.3.5+. No other steps are necessary.
Vendor References
- Spring Data MongoDB SpEL Expression Injection Vulnerability -
spring.io/blog/2022/06/20/spring-data-mongodb-spel-expression-injection-vulnerability-cve-2022-22980
CVEs related to QID 376684
Software Advisories
Advisory ID | Software | Component | Link |
---|---|---|---|
Spring |
![]() |