Skip to main content
Mallory
HighExploited in the wildCISA KEVPublic exploitVulnerability

CVE-2014-3120: MVEL Script Injection RCE in Elasticsearch _search

Published Jul 28, 2014 · Updated 1 month ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 daysNo mention activity in the last 30 days.
CVSS8.1High · v3.1
EPSS88.6%100th percentile
CISA KEVYesAdded Mar 25, 2022
In the wildActivePer CISA KEV
Vendors
ElasticElasticsearch
IdentifiersCVE-2014-3120CWE-94

CVE-2014-3120 is a remote code execution vulnerability in Elasticsearch before 1.2.0 caused by an insecure default configuration that enables dynamic scripting through the MVEL engine. An attacker can supply a crafted script expression via the search API, including the source parameter or script_fields in a _search request, and Elasticsearch evaluates the expression without an effective sandbox. Because MVEL expressions can reach Java functionality, a remote attacker can execute arbitrary Java code and operating-system commands in the context of the Elasticsearch process. The issue is fundamentally an expression or code injection flaw exposed through Elasticsearch's scripting feature and made reachable by default in affected versions.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows unauthenticated remote code execution with the privileges of the Elasticsearch daemon. Depending on how Elasticsearch is deployed, this can lead to full compromise of the underlying host, theft or manipulation of indexed data, installation of malware such as cryptominers, service disruption, and potential follow-on compromise of adjacent infrastructure. If the Elasticsearch service runs with elevated privileges, the resulting impact can extend to root-level system compromise.

Mitigation

If you can’t patch tonight, do this now.

Restrict access to Elasticsearch HTTP interfaces to trusted administrators and application hosts only using firewalls, security groups, reverse proxies, or network segmentation. Do not expose the search API to the public Internet. Disable dynamic scripting in affected versions wherever possible. Run Elasticsearch under a dedicated low-privilege account and isolate it from sensitive host resources using virtualization, containers, or other sandboxing controls to reduce post-exploitation impact.

Remediation

Patch, then assume compromise.

Upgrade Elasticsearch to version 1.2.0 or later, where the insecure default behavior was changed. On systems that cannot be immediately upgraded, disable dynamic scripting and remove or tightly restrict any capability that permits MVEL script execution through search requests. Review deployment practices to ensure Elasticsearch does not run with unnecessary privileges and is not exposed directly to untrusted networks.

Public exploits

Exploits

2 exploits validated by Mallory's analysis. Hidden: 1 rejected by Mallory's analysis as not a working exploit; 1 not yet analyzed, such as Exploit-DB entries.

View more in app →
script_mvel_rce.rbThis repository contains a single Metasploit module (script_mvel_rce.rb) that exploits CVE-2014-3120, a remote code execution vulnerability in ElasticSearch versions prior to 1.2.0. The exploit leverages the REST API's dynamic scripting feature, which allows unauthenticated attackers to execute arbitrary Java code via specially crafted search requests. The module determines the target's OS, identifies a writable directory, uploads a Java JAR payload (containing a Metasploit shell or similar), and executes it using Java reflection. The exploit is weaponized, allowing for customizable payloads and full remote code execution. The main network endpoint targeted is the ElasticSearch REST API (default port 9200, path /_search). The module is written in Ruby and is designed to be used within the Metasploit framework.Disclosed Dec 9, 2013 · Framework: metasploit · ruby · networkWeaponizedvulhub-elasticsearch-cve-2014-3120This is a deliberately vulnerable training environment with a documented exploit, rather than a standalone automated exploit tool. The two app READMEs contain equivalent English and Chinese HTTP walkthroughs: create an indexed document, then POST to /_search?pretty with an MVEL script in script_fields. Java Runtime.exec runs the hardcoded command id, and Scanner returns stdout in the search result. No reverse shell, persistence, credential theft, or container escape payload is supplied, despite the CTF metadata describing a shell as the challenge objective. The documented command-execution payload supports the OPERATIONAL classification, but it was not executed or independently validated here. The 33 files comprise CTF metadata; publishing and validation workflows; root documentation and licensing; the vendored app walkthrough and minimal Compose configuration; an Elasticsearch image Dockerfile, Bash entrypoint, and logging configuration under base/; a version-check script; the authoritative isoloom.yml; and generated deployment artifacts under .isoloom/. These artifacts support Docker, Kubernetes, Docker-hosting Vagrant and Proxmox VMs, and six cloud providers: AWS, Azure, DigitalOcean, GCP, Linode, and OCI. The code-file count of 15 includes seven Terraform files, one Ruby Vagrantfile, six shell scripts, and one Dockerfile; declarative YAML/JSON files and README-embedded payloads are excluded from that count. MVEL is present only in documentation. Isoloom is deployment tooling, not an exploit framework. Checks verify HTTP availability, the reported Elasticsearch version, and blocked internet access; they do not exercise the RCE or prove exploitability. Docker uses a route-removal sidecar, while Kubernetes uses egress NetworkPolicies whose enforcement depends on the cluster networking implementation. Local generated deployment defaults to loopback publishing, cloud firewalls restrict SSH and ports 9200/9300 to an operator-supplied CIDR, and Kubernetes creates a LoadBalancer with ingress allowed to those ports from any IPv4 source. The minimal vendored app Compose file lacks the generated isolation controls. Command execution occurs inside the vulnerable Elasticsearch container, not inherently on its host. Network observables are target API paths, private lab addresses, isolation probes, and software/provisioning download endpoints; no hardcoded attacker callback is present. Provisioning contains legitimate cleanup commands and Docker installer execution, which are not evidence of a fake exploit. The upstream Vulhub source is documented at commit 8fd63916f7a8711e2e01dda0d27237e4d6175d38, but the original analyzed repository URL, its analyzed Git reference, and archive byte size were not supplied; empty strings and zero represent unavailable repository metadata.CyberCTF · Disclosed Oct 8, 2026 · sh · bash · web · networkOperational
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
ElasticElasticsearchapplication
ElasticsearchElasticsearchapplication
FAQ

Frequently asked questions

Is CVE-2014-3120 exploited in the wild?
Yes. As of Oct 16, 2026, Mallory has reports of exploitation in the wild, and CISA added it to KEV on Mar 25, 2022.
Is there a public exploit for CVE-2014-3120?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2014-3120, the earliest disclosed Dec 9, 2013.
Is there a patch for CVE-2014-3120?
Upgrade Elasticsearch to version 1.2.0 or later, where the insecure default behavior was changed. On systems that cannot be immediately upgraded, disable dynamic scripting and remove or tightly restrict any capability that permits MVEL script execution through search requests.
What products are affected by CVE-2014-3120?
Elasticsearch.
How severe is CVE-2014-3120?
CVE-2014-3120 has a CVSS v3.1 score of 8.1 (High) and an EPSS score of 88.6% (100th percentile) as of Oct 16, 2026.
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malware1Malware families linked to this CVE, with evidence and IOCs.
Detection signatures3YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity1Community discussion across Reddit, Mastodon, and other social sources.