CVE-2024-52979
Medium · 6.5Elasticsearch Uncontrolled Resource Consumption Vulnerability
CVSS
6.5
EPSS
0.6%
Published
May 1, 2025
CISA due date
—
Cloudanix analysis
A problem in the search system lets specially made requests crash the service and stop searches from working until it is restarted.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- Moderate
- Impact
- Denial Of Service
- Component
- Network Service
- Class
- Denial of service
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Uncontrolled resource consumption occurs when Elasticsearch evaluates specially crafted search templates containing Mustache functions, exhausting node resources until the process crashes.
Why it matters to the business
Search and indexing operations become unavailable when nodes crash, interrupting dependent applications and data access across the environment until affected nodes are restarted or replaced.
How an attack unfolds
An attacker submits a malicious search template that abuses Mustache function evaluation to trigger excessive resource allocation inside the Elasticsearch process, causing the node to terminate and disrupting cluster availability.
How to fix it
Upgrade Elasticsearch to the fixed commit f9b6b57d1d0f76e2d14291c04fb50abeb642cfbf or later; for the listed Chainguard and Wolfi packages, deploy secrets-store-csi-driver-provider-aws version 1.0.1-r1 or newer.
How to confirm the fix worked
Confirm the running Elasticsearch version matches or exceeds the fixed commit, then verify that previously crashing templates no longer cause node termination under load testing.
Typical attack path
- Locate an exposed or reachable Elasticsearch endpoint
- Craft a search template containing abusive Mustache expressions
- Submit the template through the search or render template API
- Repeat submissions to exhaust resources and crash the node
How to detect it
Review Elasticsearch slow logs, audit logs, and node crash reports for repeated or unusually complex search template evaluations that coincide with OutOfMemory or crash events.
What your security team should do
- Apply the listed fixed versions immediately to all Elasticsearch instances
- Restrict search template creation and execution privileges to trusted roles only
- Monitor cluster health and node restarts for sudden unavailability patterns
The record
Uncontrolled Resource Consumption in Elasticsearch while evaluating specifically crafted search templates with Mustache functions can lead to Denial of Service by causing the Elasticsearch node to crash.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Maven | org.elasticsearch:elasticsearch | 0 | 7.17.25 |
| Maven | org.elasticsearch:elasticsearch | 8.0.0-alpha1 | 8.16.0 |
| Bitnami | elasticsearch | 7.17.0 | 7.17.25 |
| maven | org.elasticsearch/elasticsearch | 8.0.0-alpha1 | 8.16.0 |
Related vulnerabilities
- CVE-2025-37731 Improper Authentication in Elasticsearch PKI realm can lead to user impersonation via… Also affects org.elasticsearch:elasticsearch
- CVE-2025-37727 Elasticsearch: Insertion of Sensitive Information into Log File via reindex API Also affects org.elasticsearch:elasticsearch
- CVE-2024-52981 Elasticsearch Vulnerable to Stack Overflow due to a Large Recursion Also affects org.elasticsearch:elasticsearch
- CVE-2024-43709 Elasticsearch allocation of resources without limits or throttling leads to crash 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-37280 A flaw was discovered in Elasticsearch, affecting document ingestion when an index… Also affects org.elasticsearch:elasticsearch