/

CVE-2026-55441

Severity:

HIGH RISK

(8.6)

Template Command Execution (CWE-78) in mise Tasks

CVE-2026-55441

Deferred

Vulnerability type

Category:

Command Injection via Templating

CWE:

CWE-78, CWE-94, CWE-732

Impact:

Arbitrary Command Execution on Developer Systems

Severity:

HIGH RISK

(8.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 execution flaw in mise's task templating allows arbitrary commands to run when task definitions are rendered, even for read-only operations like listing tasks.

If an attacker can introduce malicious task-include files into a repository, merely cd'ing into that directory and invoking task listing or completion can execute attacker-controlled commands without any trust prompt.

Affected context

This vulnerability appears in mise-based developer environments that:

  • Use task-include directories such as mise-tasks/ or .mise/tasks/
  • Rely on mise's trust mechanism to gate configuration execution
  • Operate in directories that contain task includes but no mise.toml or .tool-versions config file

In these contexts, mise falls back to default includes and renders task templates using Tera, with exec() available in the template environment and no trust prompt guarding access.

Exploit preconditions

  • Attack surface: Developer workstations running mise commands in cloned or downloaded repositories.
  • Required access: Ability to place or modify task-include files in a directory that a victim might cd into (e.g., via a malicious repo, pull request, archive, or shared project).
  • Trigger point: Execution of read-only or exploratory commands that render tasks, such as:
  • mise tasks
  • mise task ls
  • mise run
  • mise tasks --usage
  • Shell tab-completion that queries tasks
  • Why exploitation is possible: Task-include files are processed on a code path that bypasses trust_check when no config file is present. During rendering, Tera templates can invoke a registered exec() function, allowing arbitrary command execution without user confirmation.

Why this happens

The root cause is an inconsistency in trust enforcement combined with unsafe template capabilities.

mise's trust model is designed around gating configuration files (mise.toml, .tool-versions) through trust_check, but task-include directories are loaded through a separate path that does not pass through this gate when no config file exists.

Within that path, Tera templates are rendered in an environment where exec() is exposed, enabling templates to run shell commands directly.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') and CWE-94: Code Injection, because untrusted template content is effectively treated as executable logic.

The missing trust boundary and over-privileged template functions together result in arbitrary command execution tied to routine read-only operations.

Potential impact

  • Developers' machines may execute arbitrary commands controlled by an attacker.
  • Attackers could install malware, backdoors, or persistently modify the local environment.
  • Sensitive data on the developer workstation (tokens, SSH keys, configuration) could be exfiltrated.
  • Local source code and build artifacts can be tampered with, enabling supply-chain compromise.
  • Subsequent pushes or releases may unknowingly contain attacker-injected changes.

General mitigation guidance

Effective mitigation centers on hardening template execution and consistently enforcing trust boundaries:

  • Restrict or remove high-privilege template functions such as exec() from environments that render untrusted project content.
  • Ensure all execution paths that can trigger template rendering or task evaluation pass through a unified trust mechanism, independent of the presence of config files.
  • Treat task definitions, includes, and templates as untrusted input by default, and require explicit user consent before enabling any behavior that could run commands.
  • Separate presentation logic (listing tasks, showing usage) from execution logic, so read-only operations never trigger side-effectful template functions.
  • Apply least-privilege principles to developer tooling, avoiding hidden automatic behavior that can run commands without clear user intent.

How teams detect issues like this

Detection typically involves a mix of static and procedural checks:

  • Static analysis of the codebase for template engines wired to functions that execute commands or scripts (e.g., exec() in Tera contexts).
  • Code review guidelines that flag any template rendering driven by repository content where trust checks are absent or conditional.
  • Policy-based enforcement that all user-configurable execution paths are mediated through a centralized trust-check system, regardless of file type.
  • Automated scanning of task-include directories in projects for suspicious template constructs (such as {{ exec(...) }}) and alerting maintainers.
  • Integration of security-focused linters or review tools into CI pipelines for developer tools, ensuring regressions in trust enforcement are caught before release.

Sources

SourceLink
github.comgithub.com/jdx/mise/security/advisories/GHSA-77g9-363w-rccq

Frequently asked

questions

Exploitation is most relevant where developers use mise to work with third-party or collaborative repositories. Any project containing malicious task-include templates can trigger command execution when tasks are listed or queried, even if the developer never explicitly runs a task.

An attacker needs the ability to provide or modify the repository contents a developer will open—such as hosting a public repo, submitting a pull request, or distributing an archive—so that it contains crafted task-include files. No direct access to the victim's machine is required beyond that.

The safest pattern is to treat all project-driven templates as untrusted and ensure they are fenced by a single, consistent trust mechanism. High-privilege functions like exec() should not be available in template environments that process untrusted content, especially for read-only commands.

Design trust models that apply uniformly across all configuration and template types, minimize automatic execution paths, and separate descriptive metadata from executable behavior. Regular security reviews focused on templating engines, plugin systems, and "read-only" commands help catch cases where execution can be triggered without explicit user intent.

Find out what's already
exploitable in your codebase.