# CVE-2026-55582: mcp-shell secure mode allowlist bypass via Git shell alias

Source: https://junglewise.ai/threats/cve-2026-55582-mcp-shell-secure-mode-allowlist-bypass-via-git-shell-alias  
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-55582 · Severity: high · CVSS 8.4 · Published 2026-08-25

mcp-shell is a command-execution server that uses a security allowlist to restrict which programs can be run. The default configuration allows Git (`/usr/bin/git`) but fails to block the exclamation mark (`!`) character. Git interprets `!` as a prefix for shell aliases, allowing an attacker to pass commands like `/usr/bin/git -c alias.pwn=!touch pwn /tmp/file` that bypass the security restrictions entirely. Any client that can connect to the service can achieve arbitrary command execution as the unprivileged `mcpuser` account running inside the default Docker container.

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-55582 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-55582 being exploited in the wild.

**How severe is CVE-2026-55582?** 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-55582?** 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-55582 attacked?** It is attacked over the network.

**Am I affected by CVE-2026-55582?** 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

This is an OS Command Injection vulnerability (CWE-78) in the `shell_exec` MCP tool handler. The security validator in `security.go:136` blocks common shell metacharacters (`|&;<>(){}[]$\`` and backticks) but omits `!`, which Git recognizes as the prefix for shell alias expansion. When an attacker supplies `/usr/bin/git -c alias.pwn=!<cmd>` as the command argument, the validation passes (Git is allowlisted, and `!` is not in the blocked set). The command is then executed via `exec.CommandContext()` with the unsanitized arguments. Git interprets `-c alias.pwn=!touch` as a configuration directive that defines a shell alias, and when the subcommand `pwn` is invoked, it expands to a shell execution of `touch`. The root cause is both the missing `!` in the metacharacter blocklist and the absence of per-executable argument policies that would restrict Git's `-c alias.*=!` pattern. The vulnerability is exploitable in the default Docker deployment with no additional authentication required.

## Affected products

- sonirico mcp-shell < 0.6.0

## Identifiers

- CVE-2026-55582
- GHSA-74hp-mggr-hv58
- GO-2026-6291

## Timeline

- 2026-08-25: disclosed: Published in GitHub Advisory Database
- 2026-06-14: other: Initially reviewed by GitHub

## 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

- [sonirico mcp-shell allowlist bypass via bash -c flag](https://junglewise.ai/threats/cve-2026-55581-sonirico-mcp-shell-allowlist-bypass-via-bash-c-flag)
- [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)
