CVE-2026-85660
nicheCommand allowlist bypass in cli-mcp-server enables hidden shell command execution
cli-mcp-server 0.2.5, a Model Context Protocol (MCP) server that exposes a whitelist of CLI commands to connected clients or AI agents, fails to validate commands embedded in shell substitution syntax when the ALLOW_SHELL_OPERATORS option is enabled. An attacker (typically via an untrusted prompt or input relayed through a connected agent) can craft command strings containing $(...) or backtick substitution: the ALLOWED_COMMANDS check in _validate_command_with_operators sees only the allowlisted command, but the substituted commands execute through the shell anyway. The result is execution of arbitrary non-allowlisted commands with the privileges of the process running the MCP server, which undermines the entire allowlist control. Only deployments running cli-mcp-server 0.2.5 with ALLOW_SHELL_OPERATORS enabled and relying on ALLOWED_COMMANDS restrictions are affected. Exploitation has not been observed: there is no public proof-of-concept, the flaw is not in CISA KEV, and EPSS puts 30-day exploitation probability at about 0.5%, while the CVSS 4.0 vector (AC:H, AT:P) indicates exploitation requires specific conditions despite the 9.2 (critical) severity.
What to do: Move off version 0.2.5 to a patched release of cli-mcp-server when one becomes available (no fixed version is specified in the available data) and check the project's advisories for the fix. As interim mitigations, disable ALLOW_SHELL_OPERATORS or treat the allowlist as advisory-only, restrict which clients/agents can invoke commands, and review execution logs for $(...) or backtick usage inside allowlisted commands.
| cli-mcp-server (package) cli-mcp-server | 0.2.5 (version cited in the advisory; no other affected ranges specified in the available data) |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
cli-mcp-server 0.2.5 contains a command allowlist bypass vulnerability in the _validate_command_with_operators function when ALLOW_SHELL_OPERATORS is enabled. Attackers can use shell command substitution syntax like $(...) or backticks to execute non-allowlisted commands that bypass the ALLOWED_COMMANDS validation check.
- Weakness
- CWE-78
- Vector
- CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
In the news0 stories
No ingested article mentions this CVE yet.