CVE-2026-55582

mcp-shell: Secure Mode Allowlist Bypass via Git Shell Alias

Published Aug 25, 2026 CVSS 3.1 · 8.4 High EPSS < 1% KEV · Not listed
Description
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.

Analysis

AI-generated

Technical impact

mcp-shell is an MCP server that runs shell commands securely, auditably, and on demand. Before 0.6.0, the default security.yaml permits /usr/bin/git, and security.go omits the '!' from containsShellMetacharacters and containsDangerousShellConstructs while applying no per‑executable argument policy. A caller of the shell_exec MCP tool can supply /usr/bin/git -c alias.pwn=!<arbitrary-command>, leading Git to create a shell alias that executes that arbitrary command as the mcp-shell process user. The default Docker image runs as the non‑root user mcpuser with Git installed and secure mode enabled, making the bypass exploitable without additional authentication beyond MCP connectivity. This flaw is a classic OS command injection (CWE‑78) that enables remote code execution with the privileges of the mcp-shell service.

Affected Systems

The vulnerability exists in versions of sonirico:mcp-shell prior to 0.6.0. The default Docker image runs as the non‑root user mcpuser and ships 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.

Risk and Exploitability

The CVSS score is 8.4, indicating a high severity. The EPSS score is not available, so the current post‑release exploitation probability is uncertain, but the fact that the flaw is enabled by default in a Docker image that requires no external authentication suggests that an attacker with MCP connectivity can exploit it immediately. The vulnerability is not listed in the CISA KEV catalog yet, but the public advisory and raw commit references indicate that the issue is known and fixable in the next release.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade sonirico:mcp-shell to version 0.6.0 or later
  • If an upgrade is not possible, modify the security.yaml allowlist to remove or restrict /usr/bin/git
  • Disable or tightly restrict the shell_exec MCP tool or secure mode in your deployment

Generated by OpenCVE AI on August 25, 2026 at 21:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-74hp-mggr-hv58 mcp-shell has a Secure Mode Allowlist Bypass via Git Shell Alias
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Sonirico
Sonirico mcp-shell
Vendors & Products Sonirico
Sonirico mcp-shell
Type Values Removed Values Added
Description 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.
Title mcp-shell: Secure Mode Allowlist Bypass via Git Shell Alias
Weaknesses CWE-78
References
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 28, 2026, 10:28 PM
Reserved
Jun 16, 2026, 11:18 PM
Status
Deferred
Published
Aug 25, 2026, 4:16 PM
Modified
Sep 9, 2026, 9:07 PM