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:

  1. A repository query method is annotated with @Query or @Aggregation
  2. The annotated query or aggregation value/pipeline contains SpEL parts using the parameter placeholder syntax within the expression
  3. The user supplied input is not sanitized by the application
Affected VMware Products and Versions

Spring Data MongoDB:

  1. 3.4.0
  2. 3.3.0 to 3.3.4
  3. 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.

  • CVSS V3 rated as Critical - 9 severity.
  • CVSS V2 rated as High - 7.6 severity.
  • 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

    CVEs related to QID 376684

    Software Advisories
    Advisory ID Software Component Link
    Spring URL Logo spring.io/blog/2022/06/20/spring-data-mongodb-spel-expression-injection-vulnerability-cve-2022-22980
    © CVE.report 2026 |

    Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties, implied or otherwise, with regard to this information or its use. Any use of this information is at the user's risk. It is the responsibility of user to evaluate the accuracy, completeness or usefulness of any information, opinion, advice or other content. EACH USER WILL BE SOLELY RESPONSIBLE FOR ANY consequences of his or her direct or indirect use of this web site. ALL WARRANTIES OF ANY KIND ARE EXPRESSLY DISCLAIMED. This site will NOT BE LIABLE FOR ANY DIRECT, INDIRECT or any other kind of loss.

    CVE, CWE, and OVAL are registred trademarks of The MITRE Corporation and the authoritative source of CVE content is MITRE's CVE web site. This site includes MITRE data granted under the following license.

    Free CVE JSON API cve.report/api

    CVE.report and Source URL Uptime Status status.cve.report