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.

SeverityCritical
CVSS 3.19.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.09.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
CWECWE-306: Missing Authentication for Critical Function
OWASP Top 10A07:2025 Authentication Failures
MITRE ATT&CKT1213.006 Databases, T1485 Data Destruction, T1565.001 Stored Data Manipulation
CategoryBroken 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: true in elasticsearch.yml on 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-passwords on releases before 8.0 or elasticsearch-reset-password on 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.
# elasticsearch.yml on every node xpack.security.enabled: true # then configure transport and HTTP TLS certificates as the Elastic documentation describes

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 trial  ·  No card required

Only need the reporting? Our reporting tool is free and open source, with the same library.


More Network Services Findings

Every Network Services finding