Skip to content
OpenAdvisories
Medium · 6.5 Scanner template Public exploit CVE-2021-22145 BIT-elasticsearch-2021-22145EUVD-2022-4866GHSA-q394-h7f5-7f44

Generation of Error Message Containing Sensitive Information in Elasticsearch

Published Jul 21, 2021 · Updated Jul 8, 2025 · Assigned by elastic

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.

Affected products

VendorProductAffectedFixed
Elastic Elasticsearch 7.10.0 – ≤ 7.13.3 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS elasticsearch No fix yet —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

Exploit-DB 1

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Automated scanner template

A ready-made Nuclei template detects this vulnerability automatically. Vulnerabilities with public scanner templates are typically probed across the internet soon after the template appears — exposed systems should be patched first.

Source: projectdiscovery/nuclei-templates (MIT) — updated daily. Only links are listed.

Affected packages

EcosystemPackageAffectedFixedRecord
Maven org.elasticsearch.client:elasticsearch-rest-client >= 7.10.0, < 7.13.4 7.13.4 GHSA-q394-h7f5-7f44

References