CVE-2024-37280
Medium · 4.9CVSS
4.9
EPSS
0.6%
Published
Jun 13, 2024
CISA due date
—
Cloudanix analysis
A bug in how Elasticsearch handles certain experimental index settings can cause the service to crash when new data is added, temporarily stopping search and logging functions.
- Exploitation
- Remote Authenticated
- Attacker needs
- High Privilege
- Complexity
- Low
- Impact
- Denial Of Service
- Component
- Application
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Ingestion of documents against an index template using an experimental dynamic 'passthrough' field mapping triggers an unbounded recursion that throws a StackOverflowError, crashing the ingest thread and rendering the node unavailable for further indexing or search operations.
Why it matters to the business
Elasticsearch clusters become intermittently or fully unavailable for data ingestion and queries, disrupting log analytics, observability, and search workloads until the affected node is restarted or the cluster is scaled.
How an attack unfolds
An attacker with index privileges creates or modifies an index template containing a passthrough dynamic mapping, then submits specially crafted documents that exercise the mapping path; the resulting recursion exhausts the stack and produces a denial of service.
How to fix it
Upgrade Elasticsearch to a build containing commit 8d96bbe3bf5fed931f3119733895458eab75dca9 or a later release that disables or corrects the passthrough mapping recursion; until patched, avoid using passthrough mappings in any index templates.
How to confirm the fix worked
Confirm the running Elasticsearch version includes commit 8d96bbe3bf5fed931f3119733895458eab75dca9; attempt document ingestion against a test index template that uses a passthrough mapping and verify no StackOverflowError occurs.
Typical attack path
- Obtain privileges sufficient to manage index templates and ingest documents
- Create or update an index template that declares a dynamic field of type passthrough
- Submit document batches that trigger the passthrough mapping logic during ingestion
- Observe StackOverflowError in logs and subsequent node or cluster unavailability
How to detect it
Search Elasticsearch and application logs for repeated StackOverflowError exceptions occurring during document ingestion or template application; correlate with spikes in failed bulk indexing requests.
- StackOverflowError
- passthrough
- dynamic field mapping
What your security team should do
- Immediately upgrade all Elasticsearch instances to a build containing the referenced fix commit
- Audit existing index templates and remove any experimental passthrough dynamic mappings
- Implement ingest pipeline validation rules that reject templates containing passthrough fields until the patch is deployed
- Monitor for StackOverflowError events in Elasticsearch logs as a temporary detection control
The record
A flaw was discovered in Elasticsearch, affecting document ingestion when an index template contains a dynamic field mapping of “passthrough” type. Under certain circumstances, ingesting documents in this index would cause a StackOverflow exception to be thrown and ultimately lead to a Denial of Service. Note that passthrough fields is an experimental feature.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | org.elasticsearch:elasticsearch | 8.13.1 | 8.14.0 |
| Bitnami | elasticsearch | 8.13.1 | 8.14.0 |
| Chainguard | elasticsearch-8 | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-8-bitnami | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-8-config | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-8-iamguarded | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-config | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-fips-8 | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-fips-8-bitnami | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-fips-8-config | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-fips-8-policy-140-2 | 0 | 8.14.1-r0 |
| Chainguard | elasticsearch-fips-8-policy-140-3 | 0 | 8.14.1-r0 |
| Chainguard | sonarqube | 0 | 25.10.0.114319-r0 |
| Chainguard | sonarqube-10 | 0 | 25.3.0.104237-r0 |
| Chainguard | sonarqube-10-docker-compat | 0 | 25.3.0.104237-r0 |
| Chainguard | sonarqube-10-scripts | 0 | 25.3.0.104237-r0 |
| Chainguard | sonarqube-docker-compat | 0 | 25.10.0.114319-r0 |
| Chainguard | sonarqube-scripts | 0 | 25.10.0.114319-r0 |
| Ubuntu:16.04:LTS | elasticsearch | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | elasticsearch | 0 | No fix |
| Wolfi | sonarqube | 0 | 25.10.0.114319-r0 |
| Wolfi | sonarqube-10 | 0 | 25.3.0.104237-r0 |
| Wolfi | sonarqube-10-docker-compat | 0 | 25.3.0.104237-r0 |
| Wolfi | sonarqube-10-scripts | 0 | 25.3.0.104237-r0 |
| Wolfi | sonarqube-docker-compat | 0 | 25.10.0.114319-r0 |
| Wolfi | sonarqube-scripts | 0 | 25.10.0.114319-r0 |
| maven | org.elasticsearch/elasticsearch | 8.13.1 | 8.14.0 |
Related vulnerabilities
- CVE-2025-37731 Improper Authentication in Elasticsearch PKI realm can lead to user impersonation via… Also affects org.elasticsearch:elasticsearch
- CVE-2024-12539 Elasticsearch Incorrect Authorization vulnerability Also affects org.elasticsearch:elasticsearch
- CVE-2024-23444 It was discovered by Elastic engineering that when elasticsearch-certutil CLI tool is… Also affects org.elasticsearch:elasticsearch
- CVE-2023-49921 An issue was discovered by Elastic whereby Watcher search input logged the search query… Also affects org.elasticsearch:elasticsearch
- CVE-2024-23449 An uncaught exception in Elasticsearch >= 8.4.0 and < 8.11.1 occurs when an encrypted PDF… Also affects org.elasticsearch:elasticsearch
- CVE-2024-23451 Incorrect Authorization issue exists in the API key based security model for Remote… Also affects org.elasticsearch:elasticsearch
- CVE-2024-23450 A flaw was discovered in Elasticsearch, where processing a document in a deeply nested… Also affects org.elasticsearch:elasticsearch
- CVE-2023-46673 It was identified that malformed scripts used in the script processor of an Ingest… Also affects org.elasticsearch:elasticsearch