Executive brief
MCPHub is a self-hosted MCP gateway and control plane for managing MCP servers. The ServerController component in MCPHub is vulnerable to command injection through improper handling of command/argument parameters, allowing an authenticated attacker to execute arbitrary operating system commands remotely. This could lead to unauthorized system access and control of the underlying infrastructure.
Technical details
MCPHub contains a command injection vulnerability (CWE-77) in the ServerController component (src/controllers/serverController.ts) where user-supplied command and argument parameters are not properly sanitized before being passed to OS command execution functions. The vulnerability requires authentication to exploit but can be triggered remotely over the network without user interaction. An attacker with valid credentials can inject shell metacharacters into the command/args parameters to execute arbitrary operating system commands with the privileges of the MCPHub process. The vulnerability affects all versions up to and including 0.9.10. Proof-of-concept code has been publicly disclosed, and the vendor was contacted but has not responded with a fix.
Affected products
- samanhappy @samanhappy/mcphub up to 0.9.10
Timeline
- 2025-10-05: disclosed: Vulnerability disclosed in GHSA-5q2p-3jg8-2m98