/

CVE-2026-33646

Severity:

CRITICAL RISK

(9.6)

Command Injection (CWE-94) via mise .tool-versions parsing

CVE-2026-33646

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-94

Impact:

Arbitrary Command Execution on Developer Systems

Severity:

CRITICAL RISK

(9.6)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A command injection issue in mise allows arbitrary command execution when .tool-versions files are parsed through the Tera template engine with exec() enabled.

If an attacker can introduce a malicious .tool-versions file into a project or repository, commands may run automatically as soon as a developer with mise active changes into that directory, without any trust prompt.

Affected context

This vulnerability affects environments where mise is used to manage developer tools and automatically parses .tool-versions files on directory change.

Risk is elevated when developers routinely clone or pull code from shared or untrusted repositories, since .tool-versions files are not subject to the same trust verification as .mise.toml in non-paranoid mode.

The issue surfaces during normal workflow actions such as git clone followed by cd, where template evaluation can trigger embedded exec() calls.

Exploit preconditions

  • Attack surface: Developer workstations or CI agents running mise with automatic activation.
  • Required access: Ability to create or modify a .tool-versions file in a repository or directory the victim will enter (e.g., push to shared git repo).
  • Trigger point: User runs cd (or equivalent tooling) into a directory containing the malicious .tool-versions file, causing mise to parse it via Tera.
  • Why exploitation is possible: The Tera template engine is configured with the exec() function registered, and .tool-versions files are processed without trust verification, allowing untrusted template code to execute commands.

Why this happens

The underlying bug is an unsafe template evaluation pattern where configuration files are treated as executable templates with access to an exec() primitive.

By parsing .tool-versions through Tera with exec() registered and without applying a trust model, mise effectively allows untrusted configuration data to drive command execution.

This maps to CWE-94: Improper Control of Generation of Code, since attacker-controlled template content is executed as code/commands during configuration processing rather than being strictly interpreted as data.

Potential impact

  • Attacker-supplied commands can execute on developer machines when they enter affected directories.
  • Compromise of local development environments, including credential theft or environment variable exfiltration.
  • Installation of malware, backdoors, or persistence mechanisms on developer or CI systems.
  • Manipulation of build outputs or introduction of supply-chain attacks via tampered tooling.
  • Lateral movement from compromised developer workstations into other infrastructure.

General mitigation guidance

Mitigation centers on eliminating command-capable primitives from untrusted configuration parsing and enforcing strict trust boundaries for templates.

Recommended patterns include:

  • Treating configuration files (.tool-versions) as data only, avoiding templating engines that support command execution.
  • Disabling or strictly scoping any exec-like function in template rendering paths, especially for files sourced from repositories.
  • Applying explicit trust verification for all configuration sources, not just select file types, and defaulting to paranoid/deny-by-default modes.
  • Running mise-related processes with least privilege to limit blast radius if a configuration is abused.
  • Documenting configuration trust rules so developers understand which files can trigger execution and under what conditions.

How teams detect issues like this

Detection efforts can focus on both code and workflow:

  • Use static analysis or code search to identify template usage that registers exec() or similar command execution functions on configuration paths.
  • Add code review checks to flag any configuration parsing that treats repository files as executable templates rather than passive data.
  • Implement policy-based controls that prohibit command-capable templating in configuration loaders or require explicit trust gating.
  • Employ host-based monitoring on developer and CI machines to alert on unexpected command execution originating from mise or related processes when directories are entered.
  • Integrate automated security review tools into CI to scan mise-related code and configuration handling for command injection patterns.

Sources

SourceLink
github.comgithub.com/jdx/mise/security/advisories/GHSA-fjj5-v948-whjj

Frequently asked

questions

Exploitation typically occurs on local developer or CI environments, but it can be triggered remotely by convincing a victim to clone and enter a malicious repository that contains a crafted .tool-versions file.

An attacker needs the ability to place or modify a .tool-versions file in a directory that a victim using mise will enter, such as committing it to a shared git repository or contributing it to a project.

The safest pattern is to treat configuration files as data only, remove command-capable functions like exec() from template rendering for untrusted inputs, and ensure all configuration processing is gated by a clear trust model that defaults to non-execution.

Future prevention should focus on designing configuration and templating systems with strict separation of data and executable logic, enforcing paranoid-by-default trust modes, regularly reviewing configuration parsers for injection paths, and adding automated checks to block introduction of exec-like capabilities on repository-controlled files.

Find out what's already
exploitable in your codebase.