Skip to content
NewCybercrime Report 2026 · Eight Chapters · A Post Is Not An Incident → Explore The ChaptersCybercrime Report 2026 → Explore

Spring Data Elasticsearch SpEL Code Execution (CVE-2026-123886)

CVE-2026-123886 is a Spring Data Elasticsearch expression injection flaw in string-based repository queries.

Reviewed by
Brandefense Analyst Team
Published
Reading Time
3 min read
CVE ID
CVE-2026-123886
Vendor
Spring
Affected Product
Spring Data Elasticsearch
Exploitation
Not confirmed
Published
2026-11-19

Spring says a remote attacker can execute arbitrary code in an affected application when untrusted input reaches a positional placeholder in an @Query method.Spring published its advisory on 19 November 2026. The vendor also says repeated requests can exhaust application memory through an unbounded expression cache. This is a flaw in the application's Spring Data Elasticsearch query handling, not a vulnerability attributed to the Elasticsearch server.

What it allows

How Does CVE-2026-123886 Reach Code Execution?

Spring Data Elasticsearch substitutes method arguments into positional placeholders before evaluating SpEL in the resulting query. If an argument contains an expression, the framework evaluates it even when the declared query does not use SpEL. That ordering crosses the boundary between untrusted data and executable expression text.

The exposed path requires all three conditions in Spring's advisory: an affected library version, a string-based repository @Query with positional placeholders, and an untrusted argument passed into that method. Spring says the result can be arbitrary code execution in the application. Repeated requests can also exhaust memory through the unbounded expression cache.

We recommend prioritizing applications where external input can reach these repository methods. Trace the input path and review application telemetry for repeated requests to affected workflows or unexplained memory growth. These are defensive review steps inferred from Spring's described attack path, not vendor-published indicators.

Brandefense Blackhole counted one dark-chat item mentioning CVE-2026-123886 from 25 August through 23 November 2026. The measured unit is a chat item mentioning the identifier, not an affected deployment or verified incident. That observation does not establish active exploitation.

CISA KEV catalog version 2026.11.20 did not list the CVE. Use Vulnerability Intelligence to keep the application inventory and remediation status together, while treating Spring's advisory as the source for scope and fixes.

Who is affected

Version Check

Spring Data Elasticsearch
Release LineAffected RangeFixed In
6.0.x6.0.0 to before 6.0.96.0.9
6.1.x6.1.0 to before 6.1.36.1.3
Release ranges source

For distribution packages and custom builds, check the supplier’s advisory.

An affected version becomes an exploitable application path only when untrusted input reaches a positional placeholder in a string-based repository @Query method. Check that code path separately.

Which Spring Data Elasticsearch Versions Are Affected?

Spring lists Spring Data Elasticsearch 6.0.0 through 6.0.8 and 6.1.0 through 6.1.2 as affected. The fixed releases are 6.0.9 for the 6.0 branch and 6.1.3 for the 6.1 branch. The advisory does not identify other product versions as affected.

Version alone does not establish an exploitable application path. Check whether each application declares a string-based repository @Query with positional placeholders and passes an untrusted argument into that method. Record that input path alongside the library version in the vulnerability prioritization review.

Inspect the resolved Spring Data Elasticsearch dependency in the deployed artifact, then verify the running application uses 6.0.9 or 6.1.3 as appropriate. A build file alone may not reflect the version packaged and deployed. Preserve the deployed version and query-path review in the patch management record.

If upgrading must wait, Spring advises rejecting input containing its specified expression delimiter before it reaches affected @Query methods. It also names CriteriaQuery and NativeQuery as alternatives to string-based queries. Treat those changes as interim controls and verify the application behavior after implementation.

Timeline

  1. 2026-11-19

    Spring published its advisory and named 6.0.9 and 6.1.3 as fixed releases.

  2. 2026-11-23

    NVD published the CVE record with a CVSS 3.1 score of 8.8.

What to do

  1. Identify affected applications and query paths

    Inventory applications using Spring Data Elasticsearch 6.0.0 through 6.0.8 or 6.1.0 through 6.1.2. Review repository methods for string-based @Query positional placeholders and trace whether their arguments can contain untrusted input.

  2. Apply the corresponding fixed release

    Upgrade the 6.0 branch to Spring Data Elasticsearch 6.0.9 or the 6.1 branch to 6.1.3. Test affected repository methods after updating.

  3. Verify the deployed dependency

    Inspect the resolved dependency in the deployed artifact and confirm the running application uses the fixed release for its branch. Save that version and the rollout result as remediation evidence.

  4. Use vendor alternatives if an upgrade must wait

    Apply Spring's input rejection rule before affected @Query methods, or replace string-based queries with CriteriaQuery or NativeQuery. Validate the changed query behavior and continue toward the fixed release.

  5. Review application telemetry

    For in-scope workflows, examine repeated requests and memory growth around repository query execution. This review follows the vendor-described memory exhaustion path; it is not a vendor-provided detection signature.

What Brandefense can do

Frequently Asked Questions

Does CVE-2026-123886 affect every Elasticsearch deployment?

Spring describes an application-side Spring Data Elasticsearch flaw. Exposure requires an affected version and untrusted input reaching a positional placeholder in a string-based repository @Query method.

Can a query be affected if it does not explicitly use SpEL?

Yes. Spring says it evaluates an injected expression after substituting positional arguments, even when the declared query does not use SpEL.

Which releases fix the two affected branches?

Spring lists 6.0.9 as the 6.0 fix and 6.1.3 as the 6.1 fix. Confirm the fixed dependency in the deployed, running application.

What can teams do while an upgrade is pending?

Spring recommends rejecting input containing its expression delimiter before affected @Query methods, or using CriteriaQuery or NativeQuery instead of string-based queries.

Sources

  1. Spring Data Elasticsearch SpEL Expression Injection through String-based Query Method ArgumentsSpring
  2. CVE-2026-123886 RecordNIST NVD
  3. Known Exploited Vulnerabilities CatalogCISA
ShareLinkedInX
Brandefense logo

Stay Ahead of Digital Threats.

Take control of your digital security with an exclusive demo of our AI-driven threat intelligence platform.

Open The Full Demo Form →