Tufantunc SSH-MCP Command Injection Vulnerability in Versions Prior to 1.5.0

Vulnerability

A command injection vulnerability has been identified in Tufantunc SSH-MCP versions prior to 1.5.0. The issue arises in the 'shell.write' function within 'src/index.ts', where the 'description' parameter is manipulated, leading to the execution of arbitrary commands as root. This vulnerability is exploited locally when the 'su' mode is active, allowing attacker-controlled commands to be executed with elevated privileges.

Impact

Exploitation of this vulnerability allows for arbitrary command execution as the root user, posing a significant privilege escalation risk.

Reproduction

To reproduce this vulnerability, first ensure that the SSH-MCP server is running with 'su' mode enabled. This can be done by starting the server with the '--suPassword' option. Once the server is running, use an MCP client to send a command execution request through the 'exec' tool, including a 'description' parameter that contains newline characters. The injected commands will be executed in the root shell session, demonstrating the command injection flaw.

Remediation

Users are advised to update to SSH-MCP version 1.5.0 or later, where this vulnerability has been addressed.

Added: Apr 26, 2026, 1:18 PM
Updated: Apr 26, 2026, 1:18 PM

Vulnerability Rating

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

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