Skip to main content
← All vulnerabilities
CVE-2026-55582GO-2026-6291GHSA-74HP-MGGR-HV58

mcp-shell: Secure Mode Allowlist Bypass via Git Shell Alias

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 0.6.0
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  3. Record last updated

Affected versions

  • sonirico mcp-shell

    fixed in 0.6.0

  • github.com/sonirico/mcp-shellGo

    fixed in 0.6.0

References 4

GitHub · sonirico/mcp-shell