CVE-2026-123886
Spring Data Elasticsearch SpEL Expression Injection through String-based Query Method Arguments
- Severity
- high CVSS 8.8 (v3.1)
- Affects
- Spring Data Elasticsearch · Spring
- Weakness
- CWE-94 Improper Control of Generation of Code ('Code Injection')
- Published
- 23 November 2026 by vmware
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.
Our coverage
We have not written about this one. Know why it matters? Send a tip.