wonderwhy-er DesktopCommanderMCP Command Injection Vulnerability in CommandManager Function

Vulnerability

A critical vulnerability allowing OS command injection has been identified in wonderwhy-er DesktopCommanderMCP versions through 0.2.13. The issue arises in the CommandManager function within the file src/command-manager.ts. The vulnerability can be exploited remotely by bypassing the application's command blocklist. This is achieved by using shell command substitution syntax, such as '$(...) or backticks, to nest blocked commands within allowed ones. As a result, an attacker could execute arbitrary commands on the server, depending on the user's privileges.

Impact

Exploitation of this vulnerability allows for arbitrary command execution on the server, with the impact varying based on the privileges of the user running the application.

Reproduction

To reproduce this vulnerability, set up DesktopCommanderMCP with an MCP Client. Then, send a command that includes a blocked command, such as 'iptables', nested within an allowed command, like 'echo'. The application should block the 'iptables' command, but due to the vulnerability, it will be executed instead.

Added: Oct 8, 2025, 7:18 PM
Updated: Oct 8, 2025, 7:42 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
10.0
exploitability
6.6
remediation
0.0
relevance
0.7
threat
6.4
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.