MCP SSH manager tool lets agents run commands on every server
An advisory published on 30 November 2026 says backup tools in the npm package mcp-ssh-manager pass unescaped arguments straight to a remote shell.
By The Agentic Times ·

A GitHub security advisory published on 30 November 2026 describes a remote code execution flaw in mcp-ssh-manager, an npm package that gives AI agents SSH access to remote servers through the Model Context Protocol. According to the advisory, tracked as GHSA-qwwm-vrm9-4mw8 and CVE-2026-129995, anyone who controls the arguments passed to the package's backup tools can run arbitrary operating system commands on every remote server the instance manages. All versions up to and including 3.8.0, the latest release at the time of the report, are affected.
The problem sits in a single file, src/backup-manager.js. The advisory says every command builder in that file glues caller-supplied values — database names, database users, passwords, hosts, backup directories, file paths and exclusion patterns — directly into a shell command string with no escaping. The finished string is handed to ssh.execCommand(), which the advisory says runs it through the remote server's login shell via ssh2. Shell metacharacters such as semicolons, backticks, pipes and $(...) are therefore interpreted as commands rather than treated as text. The advisory classifies the issue as CWE-78, improper neutralisation of special elements in an OS command.
Four tools are listed as reachable sinks: ssh_backup_create, ssh_backup_restore, ssh_backup_schedule and ssh_backup_list. The advisory notes that the scheduling tool writes a script to the remote host and installs a cron job, making injected commands persistent. The tool handlers apply no validation beyond checking that arguments are strings, according to the write-up.
The advisory singles out one case as the most critical. ssh_backup_list is not in the package's list of tools blocked in read-only mode, is not treated as command-bearing, and its handler does not call the policy check at all. The result, the advisory says, is that the policy engine returns "allowed" for that tool in both readonly and restricted modes. An operator who locks a server down to read-only, expecting that the agent can never run commands there, can still be made to execute arbitrary commands through the unescaped backupDir argument.
The advisory presents proof-of-concept output taken from the unmodified repository code. Passing a database name of appdb; id > /tmp/pwned.txt; # produces a mysqldump command string containing the injected id call. Delivering that exact string over SSH exec, which the advisory says is what the package does internally, wrote the output of id to a file on the test host as the connecting user. A second example does the same thing through the list-backups tool by breaking out of the quoted directory path in a find command.
The report frames this as an unfinished fix rather than a new class of bug. The same injection pattern was addressed in the package's database helpers under CVE-2026-77383, which introduced a central shellQuote() helper. According to the advisory, that helper appears 95 times in src/database-manager.js and not once in src/backup-manager.js, leaving the parallel backup builders untouched. The earlier advisory carried a similar note about a list tool bypassing read-only and restricted modes.
The advisory records the issue as reported against the repository bvisible/mcp-ssh-manager. Impact is described as arbitrary command execution running as the configured SSH user on managed remote hosts.
Sources
- github.comhttps://github.com/advisories/GHSA-qwwm-vrm9-4mw8
