CVE-2026-33646

CVE-2026-33646: Mise Arbitrary Code Execution via Tera Template Injection in .tool-versions

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.

Vulnerability Intelligence

Public PoC

Affected Software

Vendor
rust
Product
mise
Versions
< 2026.3.10

Timeline

Disclosed
June 22, 2026

CVSS

9.6
Critical (9.0–10)
Read the write-up →

What is CVE-2026-33646 CVE-2026-33646: Mise Arbitrary Code Execution via Tera Template Injection in .tool-versions?

CVE-2026-33646: Mise Arbitrary Code Execution via Tera Template Injection in .tool-versions (CVE-2026-33646) maps to the Execution and Persistence and Defense Evasion tactics — the adversary is trying to run malicious code in MITRE ATT&CK.

This page provides production-ready detection logic for CVE-2026-33646: Mise Arbitrary Code Execution via Tera Template Injection in .tool-versions, covering the data sources and telemetry it touches: Microsoft Defender for Endpoint, Microsoft Sentinel DeviceFileEvents, Microsoft Sentinel DeviceProcessEvents. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Execution Persistence Defense Evasion
Microsoft Sentinel / Defender
kusto
let SuspiciousToolVersionsWrite = DeviceFileEvents
| where FileName =~ ".tool-versions" or FileName endswith ".tool-versions"
| where ActionType in ("FileCreated", "FileModified")
| extend FileContent = FileContent_Base64
| where isnotempty(FileContent)
| where base64_decode_tostring(FileContent) matches regex @"\{\%|\{\{|\{#"
| project TimeGenerated, DeviceId, DeviceName, InitiatingProcessAccountName, InitiatingProcessFileName, InitiatingProcessCommandLine, FolderPath, FileName, SHA256;
let MiseExecution = DeviceProcessEvents
| where FileName in~ ("mise", "mise.exe") or ProcessCommandLine has_any ("mise install", "mise trust", "mise run", "mise exec", "mise shell")
| project TimeGenerated, DeviceId, DeviceName, AccountName, FileName, ProcessCommandLine, InitiatingProcessFileName, ProcessId, SHA256;
SuspiciousToolVersionsWrite
| join kind=inner (MiseExecution) on DeviceId
| where MiseExecution_TimeGenerated between (TimeGenerated .. TimeGenerated + 5m)
| project TimeGenerated, DeviceName, AccountName, SuspiciousFile = FileName, ProcessCommandLine, FolderPath
| extend AlertDetails = strcat("Possible Tera template injection in .tool-versions executed via mise on ", DeviceName)

Correlates suspicious .tool-versions file writes containing Tera template syntax ({% %}, {{ }}, {# #}) with subsequent mise process execution on the same device within 5 minutes.

critical severity medium confidence

Data Sources

Microsoft Defender for Endpoint Microsoft Sentinel DeviceFileEvents Microsoft Sentinel DeviceProcessEvents

Required Tables

DeviceFileEvents DeviceProcessEvents

False Positives

  • Legitimate mise configuration files that happen to contain Tera-like syntax in tool version strings
  • Security researchers testing mise configurations in sandboxed lab environments
  • Automated CI/CD pipelines that write .tool-versions files and immediately invoke mise

Sigma rule & cross-platform mapping

The detection logic for CVE-2026-33646: Mise Arbitrary Code Execution via Tera Template Injection in .tool-versions (CVE-2026-33646) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: process_creation
  product: windows

Browse the community-maintained Sigma rules for this technique:


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.

  1. 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

  2. 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

  3. 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

  4. 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.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections