Memory Allocation with Excessive Size Value in Elasticsearch Highlighting Leading to Denial of Service
Elasticsearch does not enforce an upper bound on a user-supplied count accepted by a search highlighting option, and the allocation derived from that count is not accounted against any circuit breaker. An authenticated user holding only read privileges on a single searchable index can submit one small search request that causes the node to reserve an excessively large internal data structure. The allocation occurs before the existing highlighting safety limits are evaluated, so memory exhaustion raises a fatal error that terminates the Elasticsearch node process. This results in a denial of service for the affected node and degrades cluster routing and health. The defect is not volumetric and does not depend on the size of the indexed data, so a single request is sufficient.
Affected Versions:
- All versions from 8.19.0 up to and including 8.19.19
- All versions from 9.3.0 up to and including 9.5.0
Affected Configurations:
- All Elasticsearch deployments running an affected version where an attacker can authenticate to the REST API
- The attacker requires only a role granting read privileges on an index containing a text field; no write, cluster, or administrative privileges are needed
Solutions and Mitigations:
The issue is resolved in versions 8.19.20, 9.4.5, 9.5.1.
For Users that Cannot Upgrade:
- There are no workarounds for this vulnerability.
Indicators of Compromise (IOC)
Unexpected termination of an Elasticsearch node process, accompanied by a fatal out-of-memory error recorded in the Elasticsearch server log immediately before the process exits, may indicate exploitation of this vulnerability.
Elastic Cloud Serverless
Due to our continuous deployment and patching model, the vulnerability described in this security advisory was remediated in our Elastic Cloud Serverless offering before the public disclosure.
Severity: CVSSv3.1: Medium ( 6.5 ) - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
CVE ID: CVE-2026-72639
Problem Type: CWE-789 - Memory Allocation with Excessive Size Value