Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1124252 - (CVE-2014-3120) CVE-2014-3120 elasticsearch: remote code execution flaw via dynamic scripting
CVE-2014-3120 elasticsearch: remote code execution flaw via dynamic scripting
Status: CLOSED ERRATA
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
high Severity high
: ---
: ---
Assigned To: Red Hat Product Security
impact=important,public=20131209,repo...
: Security
Depends On: 1125071 1125072
Blocks: 1124259 1125074
  Show dependency treegraph
 
Reported: 2014-07-29 03:25 EDT by Murray McAllister
Modified: 2018-02-12 14:30 EST (History)
15 users (show)

See Also:
Fixed In Version: elasticsearch 1.2.0
Doc Type: Bug Fix
Doc Text:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-11 17:36:14 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2014:1170 normal SHIPPED_LIVE Important: Red Hat JBoss Fuse/A-MQ 6.1.0 security update 2014-09-10 05:33:21 EDT
Red Hat Product Errata RHSA-2014:1171 normal SHIPPED_LIVE Important: Fuse ESB Enterprise/Fuse MQ Enterprise 7.1.0 update 2014-09-10 05:43:30 EDT
Red Hat Product Errata RHSA-2014:1186 normal SHIPPED_LIVE Important: katello-configure security update 2014-09-11 21:18:39 EDT

  None (edit)
Description Murray McAllister 2014-07-29 03:25:46 EDT
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/script_mvel_rce
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.disable_dynamic: true" to elasticsearch.yml, and ensuring Elasticsearch only binds to localhost, can help mitigate this issue.
Comment 1 Tomas Hoger 2014-07-29 07:47:08 EDT
There are multiple public reports of this issue dating back to at least Nov 2013:
https://blog.liftsecurity.io/2013/11/30/elasticsearch-command-execution-using-script
https://www.found.no/foundation/elasticsearch-security/#scripting-for-fun-and-profit
http://bouk.co/blog/elasticsearch-rce/

Recent upstream blog post about (in)security of dynamic scripting:
http://www.elasticsearch.org/blog/scripting-security/

Metasploit module:
http://www.rapid7.com/db/modules/exploit/multi/elasticsearch/script_mvel_rce
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/multi/elasticsearch/script_mvel_rce.rb

Upstream commit and bug report that changed the default value of script.disable_dynamic from false to true:
https://github.com/elasticsearch/elasticsearch/commit/81e83cca
https://github.com/elasticsearch/elasticsearch/issues/5853

Upstream documentation for the script.disable_dynamic configuration option:
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-scripting.html#_enabling_dynamic_scripting

Note that support for the 'sandbox' value was only introduced later with the addition of Groovy support.
Comment 7 David Jorm 2014-09-08 01:04:09 EDT
Statement:

On Subscription Asset Manager (SAM) 1, the elasticsearch service is only bound to the loopback interface by default. To exploit this issue on a SAM 1 system, an attacker must have local access to the system. On Red Hat JBoss Fuse and Red Hat JBoss A-MQ, the elasticsearch service is only started if the insight-elasticsearch feature is installed. This feature is not installed by default.
Comment 9 David Jorm 2014-09-10 00:10:15 EDT
External References:

https://access.redhat.com/solutions/1191453
Comment 10 errata-xmlrpc 2014-09-10 01:33:31 EDT
This issue has been addressed in following products:

  Red Hat JBoss Fuse and A-MQ 6.0.0

Via RHSA-2014:1170 https://rhn.redhat.com/errata/RHSA-2014-1170.html
Comment 11 errata-xmlrpc 2014-09-10 01:43:40 EDT
This issue has been addressed in following products:

  Fuse ESB Enterprise/MQ Enterprise 7.1.0

Via RHSA-2014:1171 https://rhn.redhat.com/errata/RHSA-2014-1171.html
Comment 12 Martin Prpič 2014-09-11 05:14:20 EDT
IssueDescription:

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.
Comment 13 errata-xmlrpc 2014-09-11 17:18:45 EDT
This issue has been addressed in the following products:

  Red Hat Subscription Asset Manager 1.4

Via RHSA-2014:1186 https://rhn.redhat.com/errata/RHSA-2014-1186.html

Note You need to log in before you can comment on or make changes to this bug.