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

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), Sonirico MCP Shell. Vendors: Go, 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
    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

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.