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