mac-shell-mcp is an MCP (Model Context Protocol) server that gives AI agents a controlled shell on macOS. It ships a command whitelist containing things like ls, pwd, cat, meant to keep the agent from running anything dangerous.
CVE:CVE-2026-108953 · Severity: High (CVSS 4.0: 8.5 · CVSS 3.1: 7.8) · CWE: CWE-78, OS Command Injection · Affected: cfdude/mac-shell-mcp < 2.0.0
What Is mac-shell-mcp?
mac-shell-mcp is an open-source MCP server that lets AI assistants (Claude, Cursor, etc.) run terminal commands on macOS through a ZSH shell. It is designed to provide a "secure" execution layer with:
- A command whitelist that classifies commands as
SAFE,REQUIRES_APPROVAL, orFORBIDDEN. - An approval queue for sensitive operations like
mvandcp. - A block list for dangerous commands like
rmandsudo.
The premise is sound: give the model shell access, but fence it in. The problem is where the fence was built.
What 2.0.0 Changed
The maintainer shipped a ground-up rebuild, not a patch. Key changes:
| Before (< 2.0.0) | After (2.0.0) |
|---|---|
execFile with shell: true | execFile with no shell, argv reaches execve directly |
| Whitelist checked command basename | Commands resolve by full path from root-owned directories |
| No argument validation | Per-command argument allowlists; a command declaring none accepts none |
| 7 MCP tools could mutate policy at runtime | All policy-mutation tools removed |
| Approval queue with no timeout | Approval queue removed entirely |
| Child process inherited the full environment | Child environment is constructed |
Disclosure Timeline
| Date | Event |
|---|---|
| Jan 28, 2026 | Vulnerability reported privately via GitHub Security Advisory (GHSA-2h3j-235x-vx2q) |
| Jun 13, 2026 | First follow-up sent; no response from maintainer |
| Late Sep 2026 | Second follow-up sent; no response |
| Aug 29, 2026 | Maintainer commits 2.0.0 fix (PR #20) |
| Oct 4, 2026 | Public issue #45 opened to request advisory publication |
| Oct 11, 2026 | CVE reserved via VulnCheck (third-party CNA) |
| Oct 12, 2026 | CVE-2026-108953 published |
What You Can Do With This
If you use mac-shell-mcp:
- Update to 2.0.0 immediately. The fix is a breaking change (7 tools removed, authorization model replaced), so test your integration, but don't delay.
- Audit your MCP server connections. If you run multiple MCP servers in one session, any one of them could have sent crafted tool calls to the vulnerable version.
If you build MCP servers that execute commands:
- Never pass shell: true to execFile or spawn. If you don't need shell interpretation, don't invite it. Pass arguments as an array and let Node call
execvedirectly. - Validate arguments, not just command names. A whitelist that checks the binary but ignores the arguments is a gate with no wall.
- Don't expose policy-mutation tools over MCP. If the model can change what commands are allowed, the whitelist is decorative.
- Treat every tool call as untrusted input. MCP tool calls originate from model output, which is influenced by everything the model has read like web pages, documents, emails. Assume adversarial input.
References
- CVE-2026-108953 (cve.org)
- NVD Entry
- VulnCheck Advisory
- GitHub Advisory GHSA-2h3j-235x-vx2q
- Patch Commit (2.0.0)
The Bigger Question
mac-shell-mcp had a whitelist, an approval queue, and a forbidden list. It still shipped a High-severity command injection for months. If a server designed around security controls got this wrong, what's hiding in the MCP servers your team installed for convenience and never looked at again?
mcp-audit gives security teams visibility into which MCP servers are connected across developer machines, what tools they expose, and where the risk is before the next CVE makes it your problem.
