Detect CVE-2026-33646: Mise Arbitrary Code Execution via Tera Template Injection in .tool-versions in Elastic Security
Detects exploitation of CVE-2026-33646, a critical trust bypass vulnerability in mise (formerly rtx) versions prior to 2026.3.10. Attackers can embed Tera template directives inside .tool-versions files to achieve arbitrary code execution when mise processes the file, bypassing trust checks. CVSS 9.6. PoC public.
MITRE ATT&CK
- Tactic
- Execution Persistence Defense Evasion
Elastic Detection Query
sequence by host.id with maxspan=5m
[file where event.action in ("creation", "modification") and
file.name == ".tool-versions" and
process.name != null and
/* Tera template markers in parent command context */
(process.command_line like~ "*{%*" or process.command_line like~ "*{{*")]
[process where event.type == "start" and
(process.name in ("mise", "mise.exe") or
process.args_count > 0 and
process.args in ("install", "trust", "run", "exec", "shell"))] EQL sequence rule correlating .tool-versions file creation/modification with Tera template markers to subsequent mise process start on the same host within 5 minutes.
Data Sources
Required Tables
False Positives & Tuning
- Developers using Tera templates legitimately in project tooling adjacent to mise
- Test environments where mise is invoked via scripts that also write config files
- Monorepos with automation that writes .tool-versions as part of project scaffolding
Other platforms for CVE-2026-33646
Testing Methodology
Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.
- Test 1Inject Tera system() call into .tool-versions and invoke mise install
Expected signal: File write event for .tool-versions, followed by mise process launch, followed by child process executing 'id' or shell writing to /tmp/mise-pwned.txt
- Test 2Malicious .tool-versions via Git Clone Simulation
Expected signal: Directory creation, .tool-versions file write by shell (not interactive mise), then mise process launch with install argument
- Test 3mise trust bypass via template in project-local .tool-versions
Expected signal: osascript child process spawned from mise with suspicious arguments, .tool-versions read by mise process
- Test 4Enumerate environment variables via Tera template injection
Expected signal: File write of .tool-versions, mise process launch, child write to /tmp/mise-env-leak.txt containing environment variable value
Unlock Pro Content
Get the full detection package for CVE-2026-33646 including response playbook, investigation guide, and atomic red team tests.