Elasticsearch Remote Code Execution
CVE-2014-3120 is a high-severity improper access control vulnerability in Elasticsearch from Elastic, with a CVSS 3.1 base score of 8.1 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. The record lists version 1.2.0 as the first without the flaw, so updating Elasticsearch to that release or later removes the exposure. CISA added it to the Known Exploited Vulnerabilities catalogue on March 25, 2022, which means attacks have been observed in the wild.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Elasticsearch to 1.2.0 or a later version.
- CISA's required action: Apply updates per vendor instructions.
- Read the advisory on elastic.co for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Elastic | Elasticsearch | before 1.2.0 | 1.2.0 |
Version data comes from NVD's product matching. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- NoneAvailability is not affected.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 8.1 | High | NVD |
| CVSS 3.1 | 8.1 | High | CISA (ADP) |
| CVSS 2.0 | 6.8 | Medium | NVD |
Official description
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Improper Access Control
The product does not restrict or incorrectly restricts access to a resource from an unauthorized actor.
How developers prevent this class of flaw
- Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.
- Compartmentalize the system to have safe areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
Timeline
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Third-party and government advisories
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2014-3120US Government Resource
Technical write-ups (may include proof of concept)
- bouk.co/blog/elasticsearch-rce/Exploit
- exploit-db.com/exploits/33370Exploit
- rapid7.com/db/modules/exploit/multi/elasticsearch/script_mvel_rceExploit, Third Party Advisory
- securityfocus.com/bid/67731Exploit
- found.no/foundation/elasticsearch-security/#staying-safe-while-developing-with-elasticsearchExploit
Other vulnerabilities in Elasticsearch
- 7.5 High severity
- 7.1 High severity
- 7.2 High severity
- 7.1 High severity
- 8.8 High severity
- 8.8 High severity
Recent Improper Access Control vulnerabilities
- 4.3 Medium severity
Oracle JRE Unspecified Exploited
- 10.0 High severity
Oracle JRE Remote Code Execution Exploited
- 10.0 High severity
Oracle Java SE Sandbox Bypass Exploited
- 9.8 Critical severity
- 10.0 High severity
- 9.8 Critical severity
Spotted an error? Tell us.