Spring Data Elasticsearch SpEL Expression Injection through String-based Query Method Arguments
- State
- Published
- Severity
- 8.8 High
- Published
- Nov 23, 2026
- Updated
- Nov 24, 2026
- Reserved
- Nov 6, 2026
Description
Spring Data Elasticsearch replaces positional placeholders in string-based @Query methods with the method arguments before it evaluates SpEL expressions in the resulting query string.
As a result, an argument that contains a SpEL expression is evaluated as part of the query, even if the declared query does not use SpEL.
An application is affected if it passes untrusted input as an argument to a repository query method that declares a @Query with positional placeholders.
In that case, a remote attacker can execute arbitrary code in the application, and repeated requests can exhaust memory through the unbounded expression cache.
| Product | Versions |
|---|---|
| Spring Data Elasticsearch Spring | 6.1.0 to before 6.1.3 Affected6.0.0 to before 6.0.9 Affected |
| CVSS | Score | How It's Reached | Source |
|---|---|---|---|
| 3.1 | 8.8 High | vmware |
Weaknesses
- CWE-94 Improper Control of Generation of Code ('Code Injection')
References
Every record here comes from the CVE Program's CVE List. © 1999-2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.