GHSA-3393-hvrj-w7v3 BIT-elasticsearch-2021-22144 CVE-2021-22144
Denial of Service in Elasticsearch
- Severity
- 5.7 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 2.44%
- Chance of exploitation in the next 30 days. Higher than 84.32% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-674 Uncontrolled Recursion
- Fix
6.8.17- Upgrade org.elasticsearch:elasticsearch to this version or later
Description
In Elasticsearch versions before 7.13.3 and 6.8.17 an uncontrolled recursion vulnerability that could lead to a denial of service attack was identified in the Elasticsearch Grok parser. A user with the ability to submit arbitrary queries to Elasticsearch could create a malicious Grok query that will crash the Elasticsearch node.
Affected versions
Maven
| Package | Vulnerable | Fixed in |
|---|---|---|
| org.elasticsearch:elasticsearch | < 6.8.17 |
6.8.17 |
| org.elasticsearch:elasticsearch | >= 7.0.0-alpha1, < 7.13.3 |
7.13.3 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
org.elasticsearch:elasticsearch Maven → 6.8.17
- maven
<dependency><groupId>org.elasticsearch</groupId><artifactId>elasticsearch</artifactId><version>6.8.17</version></dependency>- gradle
implementation("org.elasticsearch:elasticsearch:6.8.17")
Severity breakdown
CVSS 3.1 5.7
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
- Attack vector
- Adjacent
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- None
- Integrity
- None
- Availability
- High
Weakness
CWE-674: Uncontrolled Recursion
The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.
How to prevent it
- Implementation: Ensure that an end condition will be reached under all logic conditions. The end condition may include checking against the depth of recursion and exiting with an error if the recursion goes too deep. The complexity of the end condition contributes to the effectiveness of this action.
- Implementation: Increase the stack size.
References
Advisories
Other links
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GHSA-mrfm-jxgf-2h6v Elasticsearch Improper Access Control vulnerability | High Known exploited | Also affects org.elasticsearch:elasticsearch |
| GHSA-w94p-6mhw-4qxw Improper Access Control in Elasticsearch | High Known exploited | Also affects org.elasticsearch:elasticsearch |
| GHSA-mm3m-5497-xggg Elasticsearch Uncontrolled Resource Consumption Vulnerability | High | Also affects org.elasticsearch:elasticsearch |
| GHSA-5xm9-x7x4-4j5x Elasticsearch Vulnerable to Stack Overflow due to a Large Recursion | High | Also affects org.elasticsearch:elasticsearch |
| GHSA-jgx4-7v3v-vwfm Elasticsearch allocation of resources without limits or throttling leads to crash | High | Also affects org.elasticsearch:elasticsearch |
| GHSA-5mpw-4546-2wcr Elasticsearch Incorrect Authorization vulnerability | Medium | Also affects org.elasticsearch:elasticsearch |
| GHSA-5v8f-xx9m-wj44 Elasticsearch stores private key on disk unencrypted | High | Also affects org.elasticsearch:elasticsearch |
| GHSA-2hjr-vmf3-xwvp Elasticsearch Insertion of Sensitive Information into Log File | Medium | Also affects org.elasticsearch:elasticsearch |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor