Elasticsearch Without Authentication
An Elasticsearch cluster answers its REST API without credentials, so anyone who can reach it can read, change or delete the indexed data and change cluster settings.
| Severity | Critical |
| CVSS 3.1 | 9.8 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H Open in the calculator |
| CVSS 4.0 | 9.3 CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N Open in the calculator |
| CWE | CWE-306: Missing Authentication for Critical Function |
| OWASP Top 10 | A07:2025 Authentication Failures |
| MITRE ATT&CK | T1213.006 Databases, T1485 Data Destruction, T1565.001 Stored Data Manipulation |
| Category | Broken Access Control |
Description
The Elasticsearch cluster accepts requests to its REST API without authentication. Releases before 8.0 shipped with security features turned off unless they were configured, and clusters still running those releases, or configured with xpack.security.enabled: false, accept anonymous requests. Forks such as OpenSearch can be deployed with their security plugin disabled with the same result.
Anyone who can reach the API can search and download every index, which often holds application data, logs containing personal data or credentials, and other business records. They can also add, change or delete documents and whole indices and change cluster settings, and dashboards such as Kibana placed in front of an open cluster give the same access through a browser. Exposed clusters are regularly found and wiped by automated campaigns that leave ransom notes. The impact depends on the data indexed and on which networks can reach the API, but it is normally a complete loss of the cluster's confidentiality and integrity.
The issue is confirmed by sending unauthenticated HTTP requests to the API, normally on TCP 9200, and receiving data rather than an authentication error, for example from GET /_cat/indices, GET /_cluster/health or a search against an index. A secured cluster answers requests without credentials with HTTP 401. Scanners report the issue as Elasticsearch unauthenticated access or as an exposed index listing.
Remediation
Turn on Elasticsearch security and limit network access:
- Set
xpack.security.enabled: trueinelasticsearch.ymlon every node, configure TLS for the transport layer (which multi-node clusters need once security is on) and for the HTTP layer, and restart the cluster. Elasticsearch 8.0 and later configure security automatically when a new cluster is first started. - Set strong passwords for the built-in users, for example with
elasticsearch-setup-passwordson releases before 8.0 orelasticsearch-reset-passwordon later ones, and give applications and people their own users with roles limited to the indices and actions they need. - Keep anonymous access disabled, and require authentication on Kibana and any other front end.
- Bind the node to an internal address with
network.host, and restrict TCP 9200 and 9300 with firewall rules to the hosts that need them.
Review the cluster for unexpected indices, users or deleted data, and rotate any credentials found in indexed documents. Confirm the fix by repeating the unauthenticated requests and checking that each is refused with HTTP 401.
References
Add This Finding to Your Library
In Pental this write-up is in Settings, Library. Add to my library copies it into your own, rated in your firm's CVSS version, ready to put in your own words.
Free trialYour trial starts when your portal goes live, not when you sign up, so the time you spend setting up does not count. · No card required
Only need the reporting? Our reporting tool is free and open source, with the same library.