CVE-2014-3120: Elasticsearch Remote Code Execution Vulnerability
Common Vulnerabilities and Exposures assigned an identifier CVE-2014-3120 to the following vulnerability:
Name: CVE-2014-3120 URL: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-3120 Assigned: 20140429 Reference: EXPLOIT-DB:33370 Reference: http://www.exploit-db.com/exploits/33370 Reference: http://bouk.co/blog/elasticsearch-rce/ Reference: http://www.rapid7.com/db/modules/exploit/multi/elasticsearch/scriptmvelrce Reference: https://www.found.no/foundation/elasticsearch-security/#staying-safe-while-developing-with-elasticsearch Reference: http://www.securityfocus.com/bid/67731 Reference: OSVDB:106949 Reference: http://www.osvdb.org/106949
The default configuration in Elasticsearch before 1.2 enables dynamic scripting, which allows remote attackers to execute arbitrary MVEL expressions and Java code via the source parameter to search. NOTE: this only violates the vendor's intended security policy if the user does not run Elasticsearch in its own independent virtual machine.
As noted in <http://bouk.co/blog/elasticsearch-rce/>, adding "script.disabledynamic: true" to elasticsearch.yml, and ensuring Elasticsearch only binds to localhost, can help mitigate this issue.
Other sources
Elasticsearch enables dynamic scripting, which allows remote attackers to execute arbitrary MVEL expressions and Java code.
— CISA
It was discovered that the default configuration of Elasticsearch enabled dynamic scripting, allowing a remote attacker to execute arbitrary MVEL expressions and Java code via the source parameter passed to search.
The default configuration in Elasticsearch before 1.4.0.Beta1 enables dynamic scripting, which allows remote attackers to execute arbitrary MVEL expressions and Java code via the source parameter to search. NOTE: this only violates the vendor's intended security policy if the user does not run Elasticsearch in its own independent virtual machine.
— GitHub
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
redhat/katello-configureto a version that resolves this vulnerability.Fixed in 0:1.4.5.1-3.el6 - Upgrade
Upgrade
redhat/elasticsearchto a version that resolves this vulnerability.Fixed in 1.2.0 - Upgrade
Upgrade
maven/org.elasticsearch:elasticsearchto a version that resolves this vulnerability.Fixed in 1.4.0.Beta1 - Configuration
Add `script.disable_dynamic: true` to `elasticsearch.yml` to mitigate CVE-2014-3120 (disables dynamic scripting used for MVEL/Java execution via the `source` parameter to `_search`).
Elasticsearch script.disable_dynamic = true - Compensating control
Ensure Elasticsearch only binds to localhost (run it bound to 127.0.0.1) to reduce exposure to remote attackers for CVE-2014-3120.
Event History
Parent advisories
This vulnerability appears in the following advisories.
Frequently Asked Questions
What is the severity of CVE-2014-3120?
CVE-2014-3120 has been classified with a severity level that indicates a critical vulnerability in its affected components.
How do I fix CVE-2014-3120?
To fix CVE-2014-3120, update the affected packages to the recommended versions specified in the official advisories.
Which software is affected by CVE-2014-3120?
CVE-2014-3120 affects the 'katello-configure' package version 1.4.5.1-3.el6, 'elasticsearch' version 1.2.0, and various versions of 'org.elasticsearch:elasticsearch'.
Is the vulnerability CVE-2014-3120 publicly disclosed?
Yes, CVE-2014-3120 has been publicly disclosed and documented by various cybersecurity databases and vendors.
What are the potential impacts of CVE-2014-3120?
The potential impacts of CVE-2014-3120 include unauthorized access and compromise of data within the affected Elasticsearch instances.