Summary
mise versions 2026.2.18 through 2026.4.5 load trust-control settings from a local project .mise.toml before performing the intended trust check.
An attacker who can introduce a malicious .mise.toml into a repository can cause that same file to be treated as trusted and trigger dangerous directives such as [env] _.source, templates, hooks, or tasks.
Affected context
This vulnerability affects environments where mise is used to manage development tools and project automation via .mise.toml files.
It is most relevant when developers:
- Clone or work with repositories from partially trusted or unverified sources
- Run mise commands in project directories without reviewing the
.mise.toml - Rely on mise's trust model to prevent execution of untrusted project configuration
The risk appears when a project directory contains an attacker-controlled .mise.toml that is loaded before the trust check is fully enforced.
Exploit preconditions
- Attack surface: Local developer machines, CI agents, or other systems where mise is installed and used on untrusted or semi-trusted repositories.
- Required access: Ability to add or modify
.mise.tomlin a repository or working directory (e.g., via supplying a malicious repo, compromising a repo, or contributing configuration changes that get pulled). - Trigger point: A user or automated system runs mise in that directory, causing it to load trust-control settings from
.mise.tomlprior to validating trust. - Why exploitation is possible: The trust model is inverted: trust-related options are read from the same configuration file whose trust is supposed to be checked, allowing the file to self-declare or influence its trusted status and unlock dangerous directives.
Why this happens
The issue stems from improper access control around configuration trust, aligning with CWE-284: Improper Access Control.
mise is designed to treat certain project configuration and automation features as privileged, gated by a trust mechanism so that untrusted repositories cannot execute arbitrary directives.
However, in the affected versions, the implementation loads trust-control settings from .mise.toml before the trust decision is finalized.
This creates a circular dependency where the untrusted configuration file is allowed to influence whether it is considered trustworthy, effectively bypassing the intended protections.
Instead of enforcing a clear separation between trusted policy sources and untrusted project configuration, the same file controls both behavior and its own trust level.
Potential impact
- Execution of arbitrary commands or scripts via hooks, tasks, or template processing when the project is opened or mise commands are run
- Silent modification of environment variables through
[env]directives, potentially altering build, test, or deployment behavior - Contamination of local development environments, including installation or configuration of malicious tooling
- Compromise of CI pipelines that rely on mise, leading to poisoned artifacts or altered infrastructure-as-code flows
- Lateral movement opportunities if credentials, tokens, or secrets are exposed to malicious tasks or hooks
General mitigation guidance
Effective mitigation centers on enforcing a strict separation between trust policy and project configuration, and minimizing implicit trust in repository contents.
Pattern-based approaches include:
- Ensuring that trust decisions are derived from external, immutable sources (e.g., global configuration, allowlists, or signed metadata) rather than from the project file being evaluated.
- Designing trust checks to run before any project configuration is parsed or acted upon, especially for directives that can execute code, read files, or alter the environment.
- Restricting or sandboxing powerful directives (e.g., hooks, tasks, env sourcing) so they require explicit opt-in from a trusted context, regardless of project-level settings.
- Encouraging workflows where developers must explicitly acknowledge or view configuration from new repositories before enabling advanced features.
- Running mise-driven automation with least privilege, limiting the impact of any configuration that does execute (e.g., constrained environment variables, minimal filesystem and network access).
How teams detect issues like this
Detection focuses on locating configurations and code paths where trust and execution are intermingled:
- Static analysis and code review:
- Flag code paths where trust flags or policies are read from the same file that defines executable directives.
- Identify logic that reads project configuration before evaluating trust state, especially around hooks, tasks, templates, and environment sourcing.
- Look for conditions where a configuration file can elevate its own privileges (e.g., "if setting X in this file is true, treat this file as trusted").
- Configuration auditing:
- Scan repositories for
.mise.tomlentries that enable powerful directives in contexts where the repository origin is not strongly validated. - Use policy checks in CI to block or require review for changes that introduce or modify hooks, tasks, or env-sourcing sections.
- Runtime monitoring:
- Log and monitor executions triggered by project configuration (tasks, hooks, templates) and correlate them with repository origin or trust status.
- Automated security review tools can be integrated into development workflows to enforce patterns such as "no code-executing directives in untrusted or newly added configuration files."

