HIGH 8.8

CVE-2026-123886

Spring Data Elasticsearch SpEL Expression Injection through String-based Query Method Arguments

Preliminary: affected artifacts were declared by the CNA in the CVE record and have not been reviewed yet. They will be replaced by the reviewed advisory when it is published.

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.

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.data » spring-data-elasticsearchpreliminary
>= 6.0.0, < 6.0.9>= 6.1.0, < 6.1.3
6.0.9, 6.1.3

Blast radius

1affected artifacts
12affected versions
48dependent artifacts (est.)
431dependent versions

37% of the dependent artifacts (18) still pull an affected version in their latest release.

DepthDependent versions
Direct
54
2 hops
59
3 hops
250
4 hops
66
5 hops
2

Most used dependents

Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.