# CVE-2026-55581: sonirico mcp-shell allowlist bypass via bash -c flag

Source: https://junglewise.ai/threats/cve-2026-55581-sonirico-mcp-shell-allowlist-bypass-via-bash-c-flag  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-08-25. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-55581 · Severity: high · CVSS 8.4 · Published 2026-08-25

mcp-shell is a Model Context Protocol tool for secure command execution in Docker containers, designed to restrict operators to an allowlist of pre-approved binaries. A flaw in the validation logic allows an attacker to send `/bin/bash -c <arbitrary-command>` to the shell_exec tool and execute any command present in the container—such as `curl`, `wget`, or `env`—outside the allowlist. This works on default deployments with no authentication required, giving an attacker full command execution as the `mcpuser` account.

Technologies: [github.com/sonirico/mcp-shell (Go)](https://junglewise.ai/threats/technologies/github-com-sonirico-mcp-shell), [Sonirico MCP Shell](https://junglewise.ai/threats/technologies/mcp-shell). Vendors: [Go](https://junglewise.ai/threats/vendors/go), [Sonirico](https://junglewise.ai/threats/vendors/sonirico).

## Quick answers

**Is CVE-2026-55581 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-55581 being exploited in the wild.

**How severe is CVE-2026-55581?** High severity, with a CVSS score of 8.4, published 25 August 2026.

**Which products and versions are affected?** github.com/sonirico/mcp-shell (Go) < 0.6.0, SEMVER:introduced=0,fixed=0.6.0; Sonirico MCP Shell < 0.6.0.

**Is there a fix for CVE-2026-55581?** Yes. github.com/sonirico/mcp-shell (Go): upgrade to 0.6.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-55581 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-55581?** Check whether you run github.com/sonirico/mcp-shell (Go) or Sonirico MCP Shell at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- github.com/sonirico/mcp-shell (Go): upgrade to 0.6.0 or later

  ```sh
  go get github.com/sonirico/mcp-shell@v0.6.0
  ```


## Technical details

The vulnerability is an OS command injection (CWE-78) stemming from incomplete argument validation in the secure mode enforcer. The default Docker image ships `security.yaml` with `/bin/bash` in the `allowed_executables` list. The validator in `security.go` splits the input command on whitespace and checks only the first token (e.g., `/bin/bash`) against the allowlist; it does not inspect or block shell command-mode flags like `-c`. When `/bin/bash -c id` is submitted, the validator extracts `/bin/bash`, matches it against the allowlist, then passes the entire command to the executor without detecting the `-c` flag. The executor then invokes `exec.CommandContext(ctx, "/bin/bash", "-c", "id")`, which spawns bash with the `-c` flag, executing the arbitrary `id` command as `mcpuser` (UID 1000). No authentication is required, and the vulnerability is present in all default deployments.

## Affected products

- sonirico mcp-shell < 0.6.0

## Identifiers

- CVE-2026-55581
- GHSA-3x77-wg38-92r3
- GO-2026-6290

## Timeline

- 2026-06-14: disclosed
- 2026-06-14: patched: Version 0.6.0 released with fix
- 2026-08-25: advisory

## References

- [https://api.github.com/users/EQSTLab](https://api.github.com/users/EQSTLab)
- [https://github.com/EQSTLab](https://github.com/EQSTLab)
- [https://api.github.com/users/EQSTLab/gists%7B/gist_id%7D](https://api.github.com/users/EQSTLab/gists%7B/gist_id%7D)
- [https://api.github.com/users/EQSTLab/repos](https://api.github.com/users/EQSTLab/repos)
- [https://avatars.githubusercontent.com/u/148991397?v=4](https://avatars.githubusercontent.com/u/148991397?v=4)
- [https://api.github.com/users/EQSTLab/events%7B/privacy%7D](https://api.github.com/users/EQSTLab/events%7B/privacy%7D)

## Related threats

- [mcp-shell secure mode allowlist bypass via Git shell alias](https://junglewise.ai/threats/cve-2026-55582-mcp-shell-secure-mode-allowlist-bypass-via-git-shell-alias)
- [mcp-shell security disabled by default and shell interpreter allowlist bypass](https://junglewise.ai/threats/cve-2026-55580-mcp-shell-security-disabled-by-default-and-shell-interpreter)
- [A command injection vulnerability in the shell_exec function of sonirico mcp-shell v0.3.1 allows attackers to execute…](https://junglewise.ai/threats/cve-2025-61489-a-command-injection-vulnerability-in-the-shell-exec-function-of)
