CVE-2021-22145 Generation of Error Message Containing Sensitive Information in Elasticsearch
Attackers can submit malformed queries to Elasticsearch to retrieve sensitive data from memory buffers, including documents and authentication details.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-22145?
CVE-2021-22145 is a medium-severity vulnerability in Elastic Elasticsearch, published on 21 Jul 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
A memory disclosure vulnerability was identified in Elasticsearch 7.10.0 to 7.13.3 error reporting. A user with the ability to submit arbitrary queries to Elasticsearch could submit a malformed query that would result in an error message returned containing previously used portions of a data buffer. This buffer could contain sensitive information such as Elasticsearch documents or authentication details.
Which versions are affected by CVE-2021-22145?
3 open source packages ship an affected version, including org.elasticsearch.client:elasticsearch-rest-client and elasticsearch. It affects 2 products.
| Package | Affected | Fixed in |
|---|---|---|
org.elasticsearch.client:elasticsearch-rest-client Maven | From 7.10.0 | 7.13.4 |
org.elasticsearch.client:elasticsearch-rest-client Maven | From 7.10.0 | 7.13.4 |
elasticsearch Bitnami | From 7.10.0 | 7.13.4 |
Products include Elastic Elasticsearch, Oracle Communications Cloud Native Core Automated Test Suite.
How do I fix CVE-2021-22145?
Upgrade org.elasticsearch.client:elasticsearch-rest-client to 7.13.4 or later.
Is CVE-2021-22145 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-22145 exists.
Public exploit code: 1 Metasploit module, 1 Exploit-DB entry, 1 Nuclei template and 1 proofs of concept on GitHub.
Other vulnerabilities in Elastic Elasticsearch
- CVE-2015-1427 Elasticsearch Groovy Scripting Engine Remote Code Execution
- CVE-2014-3120 Elasticsearch Remote Code Execution
- CVE-2015-5377 Code injection in n/a
- CVE-2026-72649 Deserialization of Untrusted Data in Elasticsearch Leading to Remote Code Execution
- CVE-2026-72642 Use of Out-of-range Pointer Offset in the Elasticsearch Machine Learning Native Inference Process
Sources
Also known as BIT-elasticsearch-2021-22145, GHSA-q394-h7f5-7f44, UBUNTU-CVE-2021-22145.