CVE-2025-61489
MediumCVSS 6.5Exploitation Probability (EPSS)
Elevated risk62th percentile - higher than 62% of all known CVEs
Summary
A command injection vulnerability in the shell_exec function of sonirico mcp-shell v0.3.1 allows attackers to execute arbitrary commands by supplying a crafted command string.
Risk Assessment
An attacker could execute arbitrary commands in the context of the application process, potentially leading to system compromise or data leakage. The risk is high if the application processes user-supplied input.
Recommendation
Update mcp-shell to a version containing the fix or remove/disable the shell_exec function. Implement validation and sanitization of input passed to the shell.
Other vulnerabilities in mcp-shell
See all- CVE-2026-55582High
mcp-shell is an MCP server for running shell commands securely, auditably, and on demand. Prior to 0.6.0, the default security.yaml allows /usr/bin/git, while security.go omits ! from containsShellMetacharacters and containsDangerousShellConstructs and applies no per-executable argument policy. A caller of the shell_exec MCP tool can provide the command argument /usr/bin/git -c alias.pwn=!<arbitrary-command>, causing Git to create a shell alias and execute arbitrary OS commands as the mcp-shell process user. The default Docker image runs as mcpuser with Git installed and secure mode enabled, so the bypass is exploitable in the default deployment without additional authentication beyond MCP connectivity. This issue is fixed in version 0.6.0.
- CVE-2026-55581High
mcp-shell is an MCP server for running shell commands securely, auditably, and on demand. Prior to 0.6.0, the default Docker security.yaml includes /bin/bash in allowed_executables, while security.go validates only the first token and checkBlockedPatternsAndCommands does not reject the shell command-mode flag -c. A caller of the shell_exec MCP tool can provide the command argument `/bin/bash -c <arbitrary-command>`, which passes validation and reaches executor.go, where parseCommand and exec.CommandContext execute the arbitrary command as mcpuser outside the intended allowlist. This issue is fixed in version 0.6.0.
- CVE-2026-55580High
mcp-shell before version 0.6.0 disables security by default, and when MCP_SHELL_SEC_CONFIG_FILE is unset, it starts without a security policy. The command validator then short-circuits and allows any command to be executed by a connected LLM. This issue is fixed in version 0.6.0.
Original NVD description (English source)
A command injection vulnerability in the shell_exec function of sonirico mcp-shell v0.3.1 allows attackers to execute arbitrary commands via supplying a crafted command string.
Vulnerability data from NVD (NIST) · CISA KEV · EPSS

