Skip to main content

Security Exposure

Elastic's networking documentation warns never to expose an unprotected node to the public internet, because anyone could then download, modify, or delete data in the cluster. Security auto-configuration adds http.host: 0.0.0.0 to elasticsearch.yml, so HTTP listens on all interfaces unless changed. CISA added two older Elasticsearch remote code execution flaws, CVE-2014-3120 and CVE-2015-1427, to its Known Exploited Vulnerabilities catalog in March 2022.

Hardening

  • Bind HTTP and transport to loopback or private interfaces (security auto-configuration sets http.host to 0.0.0.0, so review that line as well as network.host), and firewall 9200 and 9300 from untrusted networks.
  • Use the security auto-configuration introduced in Elasticsearch 8.0, which generates TLS certificates for the HTTP and transport layers and sets a password for the elastic user.
  • Create role-based users or API keys for applications instead of sharing the superuser.
  • Upgrade Elasticsearch releases that are out of support and apply Elastic security updates.

Monitoring

Enable Elasticsearch audit logging, which records authentication attempts and authorization decisions, and alert on authentication failures, index deletions, and requests from addresses outside the application tier.

Elasticsearch Vulnerabilities

2 CVEs
CVECVSS
CVE-2015-1427KEV
Elasticsearch Groovy Scripting Engine Remote Code Execution Vulnerability
9.8
CVE-2014-3120KEV
Elasticsearch Remote Code Execution Vulnerability
8.1

Frequently Asked Questions

What is port 9200 used for?→

It is the default Elasticsearch HTTP REST API port. Port 9300 carries traffic between cluster nodes.

Should port 9200 be open to the internet?→

No. Elastic's documentation says an unprotected node on the public internet lets anyone read, change, or delete cluster data.

Is Elasticsearch secure by default?→

From version 8.0, the first startup generates TLS certificates for the HTTP and transport layers and sets a password for the elastic user.

Which vulnerabilities affect the service on port 9200?→

This database lists 2 CVEs related to Elasticsearch, 2 of them confirmed as exploited by CISA. Examples: CVE-2015-1427, CVE-2014-3120.

Port assignments from the IANA Service Name and Transport Protocol Port Number Registry. Services can be configured to run on any port, so traffic on port 9200 is not guaranteed to be Elasticsearch. Exploited-in-the-wild data from the CISA KEV catalog (CC0).