@akoskm Create MCP Server Stdio Command Injection Vulnerability

Vulnerability

A command injection vulnerability has been identified in the '@akoskm/create-mcp-server-stdio' package, specifically in versions prior to 0.0.13. The vulnerability arises within the MCP server tool 'which-app-on-port', which improperly uses the Node.js child process API 'exec'. This API is susceptible to command injection when combined with untrusted user input. Exploitation allows for remote command execution on the server where the MCP server is running.

Impact

Exploitation of this vulnerability allows for user-initiated and remote command injection on a running MCP server, potentially leading to unauthorized command execution on the host system.

Reproduction

To reproduce this vulnerability, use a version of the '@akoskm/create-mcp-server-stdio' package that is prior to 0.0.13. Start the MCP server and invoke the 'which-app-on-port' tool, providing input that includes special shell characters, such as those used in prompt injection attacks. The server will execute the injected commands on the host system, demonstrating the command injection vulnerability.

Remediation

Users are advised to update to version 0.0.13 or later, where this vulnerability has been patched. The update is available on the npm registry.

Added: Sep 8, 2025, 8:17 PM
Updated: Sep 8, 2025, 8:17 PM

Vulnerability Rating

Custom Algorithm
spread
0.0
impact
2.5
exploitability
8.7
remediation
7.7
relevance
0.5
threat
6.4
urgency
2.9
incentive
5.8

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