CVE-2026-55581: mcp-shell has a Secure Mode Allowlist Bypass via Default `/bin/bash` Executable
mcp-shell ships a default Docker configuration (security.yaml) that includes /bin/bash in the allowed_executables allowlist. The command validator (security.go) only checks whether the first token of the supplied command matches an allowed executable; it does not inspect or reject shell command-mode flags such as -c. As a result, any MCP tool caller can send command=/bin/bash -c <arbitrary-command> to the shell_exec tool and execute commands that are not in the allowlist — including id, env, curl, wget, and any other binary present in the container. The bypass works with the default Docker image, requires no authentication, and requires no modifications to server configuration. Successful exploitation gives the attacker arbitrary OS command execution inside the container as mcpuser.
References
- github.com/advisories/GHSA-3x77-wg38-92r3
- github.com/sonirico/mcp-shell/commit/f31377fce6ec31114e5a4398c0e5270552bce09f
- github.com/sonirico/mcp-shell/pull/16
- github.com/sonirico/mcp-shell/releases/tag/v0.6.0
- github.com/sonirico/mcp-shell/security/advisories/GHSA-3x77-wg38-92r3
- nvd.nist.gov/vuln/detail/CVE-2026-55581
Code Behaviors & Features
Detect and mitigate CVE-2026-55581 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →