mcp-shell: Secure Mode Allowlist Bypass via Git Shell Alias
Key facts
- Attack vector
- Local
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-78.
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| sonirico | mcp-shell | before 0.6.0 | 0.6.0 | Patch available | CNA |
| — | github.com/sonirico/mcp-shell (Go) | before 0.6.0 | 0.6.0 | Patch available | GHSA-74hp-mggr-hv58 |
- mcp-shell Vendorsonirico Affected before 0.6.0 Fixed in 0.6.0 Patch available CNA
- github.com/sonirico/mcp-shell (Go) Vendor— Affected before 0.6.0 Fixed in 0.6.0 Patch available GHSA-74hp-mggr-hv58
Remediation
- Fix · CNA mcp-shell (sonirico) Fixed in 0.6.0
- Fix · GHSA-74hp-mggr-hv58 github.com/sonirico/mcp-shell (Go) Fixed in 0.6.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-55582
- 2026-10-03 Alias added: GHSA-74hp-mggr-hv58
References
Other 5
- https://github.com/sonirico/mcp-shell/security/advisories/GHSA-74hp-mggr-hv58
- https://github.com/sonirico/mcp-shell/pull/16
- https://github.com/sonirico/mcp-shell/commit/f31377fce6ec31114e5a4398c0e5270552bce09f
- https://github.com/sonirico/mcp-shell/releases/tag/v0.6.0
- https://github.com/sonirico/mcp-shell
More sonirico vulnerabilities
- TI-2026-40120 mcp-shell: Secure Mode Allowlist Bypass via Default `/bin/bash` Executable CVSS 3.1HIGH 8.4
- TI-2026-40119 mcp-shell — Security Disabled by Default in Bare-Binary Deploy Path + Shell Interpreter in Secure-Mode Allowlist CVSS 4.0HIGH 8.6
- TI-2025-38006 A command injection vulnerability in the shell_exec function of sonirico mcp-shell v0.3.1… CVSS 3.1MEDIUM 6.5
Sources
- CVE-2026-55582 · CVE Program
- CVE-2026-55582 · NVD
- FIRST EPSS
- GHSA-74hp-mggr-hv58 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences