NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

CVE-2025-9654: AiondaDotCom mcp-ssh command injection vulnerability in SSH operations

mediumCVSS 4.0 5.3 · 3.1 6.3GHSA-694p-3fxc-m92h

@aiondadotcom/mcp-ssh up to 1.0.3 builds `ssh` and `scp` commands by string interpolation in `server-simple.mjs` and runs them through a shell. Crafted input in a command, host or file path argument runs extra commands on the machine hosting the MCP server. Upgrade to 1.1.0.

Published Aug 29, 2025 · Analysis Nov 1, 2026

What an attacker can do

The MCP server exposes tools to run remote commands and to upload and download files over SSH. According to the fix notes, runRemoteCommand(), uploadFile() and downloadFile() in server-simple.mjs called exec() with the remote command and the local and remote paths interpolated into one string. Shell metacharacters in any of those values are interpreted by the local shell before ssh or scp even starts.

Whoever can drive the tool calls controls those values. In practice that is an AI agent, and an agent can be steered by a prompt injection in a page, file or issue it reads. The attacker gets command execution on the developer's own machine, as the user running the server, with its SSH keys and agent access. It is separate from the remote command the tool was meant to run on the SSH target.

The CVSS vector rates it medium: network reachable, low privileges and low impact on each of confidentiality, integrity and availability.

Who is affected

@aiondadotcom/mcp-ssh up to and including 1.0.3. The advisory text says 1.0.4 and 1.1.0 resolve the issue, while the package data lists 1.1.0 as the patched version. Check the installed version:

npm ls -g @aiondadotcom/mcp-ssh

If your MCP client config launches it with npx, check which version npx resolves.

@aiondadotcom/mcp-ssh

Ecosystem
npm
Affected
< 1.1.0
Fixed in
1.1.0
Check
npm ls @aiondadotcom/mcp-ssh

How to fix it

Upgrade to 1.1.0:

npm install -g @aiondadotcom/[email protected]

The fix replaces exec() with execFile() and passes arguments as arrays, so the shell never parses the values. Per the description it landed in commit 5b9b9c5 and shipped in the 1.0.4 release. The 1.0.4 release commit cd2566a also bumps tmp for an unrelated symlink file-write issue. The sources list no workaround.

How to tell if you were hit

Review MCP client logs for calls to the SSH tools whose command, host or path arguments contain ;, |, &&, backticks or $(. On the host, look for unexpected child processes of the Node process running server-simple.mjs, and for new entries in ~/.ssh/authorized_keys or other files. The sources give no log format for this flaw.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

A security flaw has been discovered in AiondaDotCom mcp-ssh up to 1.0.3. Affected by this issue is some unknown functionality of the file server-simple.mjs. Performing manipulation results in command injection. The attack can be initiated remotely. Upgrading to version 1.0.4 and 1.1.0 can resolve this issue. The patch is named cd2566a948b696501abfa6c6b03462cac5fb43d8. It is advisable to upgrade the affected component.

Questions

Which versions of mcp-ssh are vulnerable?

Up to 1.0.3. The description says 1.0.4 and 1.1.0 resolve it, and the package data lists 1.1.0 as the patched version, so move to 1.1.0.

Which functions were injectable?

runRemoteCommand(), uploadFile() and downloadFile() in server-simple.mjs, which built ssh and scp strings and ran them with exec().

Does the attacker need access to my SSH server?

No. The injection runs in the local shell of the machine hosting the MCP server, before the connection is made. The attacker only needs to control the arguments passed to the tool.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries