CVE-2021-22145 Generation of Error Message Containing Sensitive Information in Elasticsearch

Medium 6.5 Published Updated

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.

Weakness: CWE-209, CWE-200

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.

PackageAffectedFixed in
org.elasticsearch.client:elasticsearch-rest-client MavenFrom 7.10.07.13.4
org.elasticsearch.client:elasticsearch-rest-client MavenFrom 7.10.07.13.4
elasticsearch BitnamiFrom 7.10.07.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.

All Elastic Elasticsearch vulnerabilities

Sources

Also known as BIT-elasticsearch-2021-22145, GHSA-q394-h7f5-7f44, UBUNTU-CVE-2021-22145.

Is CVE-2021-22145 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free