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.
Published: 2026-08-25
Score: 8.4 High
EPSS: < 1% Very Low
KEV: No
Impact: Arbitrary OS command execution
Action: Immediate Patch
AI Analysis

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.

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

Remediation

No vendor fix or workaround currently provided.

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

Fri, 28 Aug 2026 23:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 25 Aug 2026 18:00:00 +0000

Type Values Removed Values Added
First Time appeared Sonirico
Sonirico mcp-shell
Vendors & Products Sonirico
Sonirico mcp-shell

Tue, 25 Aug 2026 16:00:00 +0000

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'}


Subscriptions

Sonirico Mcp-shell
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-28T22:28:54.025Z

Reserved: 2026-06-16T23:18:03.169Z

Link: CVE-2026-55582

cve-icon Vulnrichment

Updated: 2026-08-28T22:28:32.635Z

cve-icon NVD

Status : Deferred

Published: 2026-08-25T16:16:55.650

Modified: 2026-09-09T21:07:31.353

Link: CVE-2026-55582

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-25T21:30:06Z

Weaknesses
  • CWE-78

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