Skip to content

Elasticsearch:

Exploitation

RCE via Groovy script injection and sandbox escape on 1.x/2.x

1 guide • Created Dec 28, 2025 • Updated Mar 29, 2026
1 guide

Elasticsearch exploitation targets scripting engines and cluster features that were never designed to be internet-facing. Older versions with Groovy or MVEL scripting enabled allow arbitrary code execution through crafted search queries.

Snapshot restore abuse lets you overwrite indices with attacker-controlled data or plant backdoors in stored documents. Misconfigured clusters may also allow index deletion, alias hijacking, or plugin installation.

The subpages cover sandbox escape techniques, script execution via the search API, and snapshot-based attacks for persistence and data manipulation.