mcp-ssh-manager 4.4.3 → 4.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [4.4.4] - 2026-12-01
11
+
12
+ **A security release: upgrade if an agent can call `ssh_sync`.** `ssh_sync` handed its local path to rsync as a
13
+ bare operand, and rsync reads an operand that starts with `-` as one of its own options: a pull to
14
+ `local:--rsh=<command>` ran that command on the machine that runs the server, as its user, with no approval in the
15
+ default configuration ([GHSA-m727-8qhq-9f7f](https://github.com/bvisible/mcp-ssh-manager/security/advisories/GHSA-m727-8qhq-9f7f), high, reported by @manus-use). A push did the same when a local
16
+ file of that name existed. `ssh_sync` is refused on `readonly` and `restricted` servers. Every published release
17
+ from 3.0.0 is affected.
18
+
19
+ ### Fixed
20
+
21
+ - **`ssh_sync` refuses a local or a remote path that starts with `-`, and always puts the two paths behind `--`.** The check comes first, before the local side is looked at; `--` ends rsync's options, so that a path can never be one even if something got past the check. A relative path can still be written `./-name`. Control characters are refused in the two paths too, as in the other tools since 4.4.3.
22
+
23
+ ### Changed
24
+
25
+ - **cross-spawn 7.1.2** in both dependency trees ([GHSA-ghv9-86vm-4v8m](https://github.com/advisories/GHSA-ghv9-86vm-4v8m), critical: a command could be injected when it spawns a batch file on Windows). It comes with the MCP SDK, whose stdio client the server does not use, and with the desktop build tools; `npm audit` reports 0 vulnerabilities again.
26
+ - Dependency updates: dotenv 18.0.10 (#188); ESLint 10 (#189), with its configuration moved to `eslint.config.js` and the same rules; the development tools knip, prettier, fast-check and @types/node (#187); the CI actions trufflehog 3.100.1 (#185) and codeql-action upload-sarif 4.39.5 (#186).
27
+
10
28
  ## [4.4.3] - 2026-11-28
11
29
 
12
30
  **A security release: upgrade if an agent can call the database, backup or deploy tools on a server you care about.**
@@ -13,8 +13,8 @@
13
13
  class SshManager < Formula
14
14
  desc "SSH server management for AI agents, with approval and audit"
15
15
  homepage "https://github.com/bvisible/mcp-ssh-manager"
16
- url "https://registry.npmjs.org/mcp-ssh-manager/-/mcp-ssh-manager-4.4.2.tgz"
17
- sha256 "942ebe3c3f3993ddee2e983eb54d779d675094ff28817f9708c4796b73a3ebf4"
16
+ url "https://registry.npmjs.org/mcp-ssh-manager/-/mcp-ssh-manager-4.4.3.tgz"
17
+ sha256 "4f4ebe829cd6be96cbd4b9797791c00e934cf28aad876dd7b2b6a8a4fa4b874c"
18
18
  license "MIT"
19
19
 
20
20
  depends_on "node"
package/README.md CHANGED
@@ -25,7 +25,7 @@
25
25
  [![Desktop app downloads](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fbvisible%2Fmcp-ssh-manager%2Fstats%2Fdesktop.json&style=flat-square)](https://github.com/bvisible/mcp-ssh-manager/releases/latest)
26
26
  [![GitHub stars](https://img.shields.io/github/stars/bvisible/mcp-ssh-manager?style=flat-square&color=c04500)](https://github.com/bvisible/mcp-ssh-manager/stargazers)
27
27
  [![MCP Toplist](https://mcptoplist.com/badge/io.github.bvisible%2Fmcp-ssh-manager.svg)](https://mcptoplist.com/server/io.github.bvisible%2Fmcp-ssh-manager)
28
- [![Version](https://img.shields.io/badge/release-4.4.3-c04500?style=flat-square)](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.3)
28
+ [![Version](https://img.shields.io/badge/release-4.4.4-c04500?style=flat-square)](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.4)
29
29
  [![Claude Code](https://img.shields.io/badge/Claude_Code-Compatible-5A67D8?style=flat-square&logo=anthropic)](https://claude.ai/code)
30
30
  [![OpenAI Codex](https://img.shields.io/badge/OpenAI_Codex-Compatible-00A67E?style=flat-square&logo=openai)](https://openai.com/codex)
31
31
  [![MCP](https://img.shields.io/badge/MCP-Server-orange?style=flat-square)](https://modelcontextprotocol.io)
@@ -58,9 +58,9 @@ An MCP SSH server is the most dangerous tool you can hand an agent: a shell on m
58
58
 
59
59
  ## Choose your workspace
60
60
 
61
- **Desktop application (`4.4.3`):** one installation with its own runtime,
61
+ **Desktop application (`4.4.4`):** one installation with its own runtime,
62
62
  terminal, file browser and server settings. No separate Node.js or npm
63
- installation. [Download it](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.3):
63
+ installation. [Download it](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.4):
64
64
 
65
65
  | Platform | File | Signature |
66
66
  |---|---|---|
@@ -68,7 +68,7 @@ installation. [Download it](https://github.com/bvisible/mcp-ssh-manager/releases
68
68
  | Windows x64 / arm64 | `…-setup.exe` | **Not code-signed yet.** Windows shows *"Windows protected your PC"*: *More info → Run anyway*. Check the file against the SHA-256 in `release-manifest-win32.json` on the release (`ssh-manager app` does it for you). Signing comes in a later release. |
69
69
  | Linux x64 | `.deb`, `.AppImage` | Unsigned, as Linux packages usually are |
70
70
 
71
- **Already using npm / the CLI?** `npm update -g mcp-ssh-manager` brings 4.4.3,
71
+ **Already using npm / the CLI?** `npm update -g mcp-ssh-manager` brings 4.4.4,
72
72
  and the V4 engine runs without an interface, from your existing `.env`, TOML or
73
73
  process variables — no automatic import, no forced wizard, no approval prompt
74
74
  unless you enable one per server. The one behaviour that tightens is **SSH
@@ -722,6 +722,8 @@ The hero animation ships twice, light and dark, swapped by `<picture>` on `prefe
722
722
 
723
723
  ## What's new
724
724
 
725
+ **[4.4.4](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.4) — a security fix: a path given to `ssh_sync` that starts with `-` was read as an option by rsync.** A pull to `local:--rsh=<command>` ran that command on the machine that runs the server ([GHSA-m727-8qhq-9f7f](https://github.com/bvisible/mcp-ssh-manager/security/advisories/GHSA-m727-8qhq-9f7f), high). `ssh_sync` now refuses a local or remote path that starts with `-` and always puts the two paths behind `--`. Also cross-spawn 7.1.2 (a critical advisory for Windows batch files, in the SDK's stdio client and the desktop build tools) and the pending dependency updates. Reported by @manus-use.
726
+
725
727
  **[4.4.3](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.3) — a security fix: a database name that starts with `-` was read as an option by the database client.** A name such as `--execute=…` or `--init-command=…`, passed to a database tool, reached `mysql` as an option and bypassed the read-only transaction ([GHSA-mwc5-p6j7-hh4q](https://github.com/bvisible/mcp-ssh-manager/security/advisories/GHSA-mwc5-p6j7-hh4q), high). Every value a tool puts in a position where a command can read it as an option now refuses a leading `-`: database names, tables, import and backup files, tar paths, backup directories, the deploy target, the service name and the file of `ssh_tail`. Reported by @usdnr-dotcom.
726
728
 
727
729
  **[4.4.2](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.2) — a session starts again on CentOS 7, and on a host that takes seconds to answer.** 4.4.1 sent a new session's set-up in a way bash 4.2 drops, so no session started on CentOS 7, and it gave the shell only five seconds to answer, too short behind a bastion. The set-up now goes on one line and the session waits up to thirty seconds. Found, traced and fixed by @nethinwei (#163, #180).
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "ssh-manager-desktop",
3
- "version": "4.4.3",
3
+ "version": "4.4.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "ssh-manager-desktop",
9
- "version": "4.4.3",
9
+ "version": "4.4.4",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "electron-updater": "^6.8.9",
@@ -1132,9 +1132,9 @@
1132
1132
  "peer": true
1133
1133
  },
1134
1134
  "node_modules/cross-spawn": {
1135
- "version": "7.0.6",
1136
- "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
1137
- "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
1135
+ "version": "7.1.2",
1136
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.1.2.tgz",
1137
+ "integrity": "sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==",
1138
1138
  "dev": true,
1139
1139
  "license": "MIT",
1140
1140
  "dependencies": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ssh-manager-desktop",
3
3
  "productName": "SSH Manager",
4
- "version": "4.4.3",
4
+ "version": "4.4.4",
5
5
  "private": true,
6
6
  "description": "The SSH Manager control plane as a desktop application",
7
7
  "main": "main.js",
package/docs/MIGRATION.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Upgrading from 3.8 to 4.0
2
2
 
3
- **4.0 is released, on npm and as a desktop application**; the latest is 4.4.3 ([release](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.3)).
3
+ **4.0 is released, on npm and as a desktop application**; the latest is 4.4.4 ([release](https://github.com/bvisible/mcp-ssh-manager/releases/tag/v4.4.4)).
4
4
  The last 3.8 release is 3.8.7, for anyone who pins the 3.8 line.
5
5
 
6
6
  The upgrade path preserves headless npm/CLI use. The application, vault import
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-ssh-manager",
3
- "version": "4.4.3",
3
+ "version": "4.4.4",
4
4
  "mcpName": "io.github.bvisible/mcp-ssh-manager",
5
5
  "description": "MCP server for SSH: let AI agents (Claude Code, Codex, any MCP client) run commands, transfer files and manage servers over SSH, with human approval, an encrypted vault and a live audit trail.",
6
6
  "main": "src/index.js",
@@ -160,9 +160,11 @@
160
160
  "zod": "^4.6.7"
161
161
  },
162
162
  "devDependencies": {
163
+ "@eslint/js": "^10.0.1",
163
164
  "@types/node": "^26.6.4",
164
- "eslint": "^8.56.0",
165
+ "eslint": "^10.16.0",
165
166
  "fast-check": "^4.10.2",
167
+ "globals": "^17.14.0",
166
168
  "knip": "^6.40.0",
167
169
  "prettier": "^3.2.4",
168
170
  "typescript": "^6.0.3"
package/server.json CHANGED
@@ -6,12 +6,12 @@
6
6
  "url": "https://github.com/bvisible/mcp-ssh-manager",
7
7
  "source": "github"
8
8
  },
9
- "version": "4.4.3",
9
+ "version": "4.4.4",
10
10
  "packages": [
11
11
  {
12
12
  "registryType": "npm",
13
13
  "identifier": "mcp-ssh-manager",
14
- "version": "4.4.3",
14
+ "version": "4.4.4",
15
15
  "transport": {
16
16
  "type": "stdio"
17
17
  },
package/src/index.js CHANGED
@@ -53,7 +53,7 @@ import {
53
53
  } from './profile-loader.js';
54
54
  import { logger } from './logger.js';
55
55
  import { parseRsyncStats } from './rsync-stats.js';
56
- import { toRsyncLocalPath } from './rsync-path.js';
56
+ import { toRsyncLocalPath, rsyncOperands } from './rsync-path.js';
57
57
  import {
58
58
  createSession,
59
59
  getSession,
@@ -1117,6 +1117,13 @@ registerToolConditional(
1117
1117
  // If no prefixes, assume old format (local source to remote dest)
1118
1118
  const direction = (isLocalSource || (!isLocalSource && !isRemoteSource)) ? 'push' : 'pull';
1119
1119
 
1120
+ // Both paths reach rsync as operands. One that starts with "-" is read as
1121
+ // an rsync option, and `--rsh=<command>` runs that command on this machine
1122
+ // (GHSA-m727-8qhq-9f7f): refused here, before the local side is looked at.
1123
+ // The operands also go behind "--" (rsyncOperands), whatever gets past this.
1124
+ positional(direction === 'push' ? cleanSource : cleanDest, 'local path');
1125
+ positional(direction === 'push' ? cleanDest : cleanSource, 'remote path');
1126
+
1120
1127
  // Build rsync command
1121
1128
  let rsyncOptions = ['-avz'];
1122
1129
 
@@ -1245,14 +1252,8 @@ registerToolConditional(
1245
1252
  processEnv.DISPLAY = '';
1246
1253
  }
1247
1254
 
1248
- // Add source and destination
1249
- if (direction === 'push') {
1250
- rsyncArgs.push(rsyncLocalPath);
1251
- rsyncArgs.push(`${serverConfig.user}@${serverConfig.host}:${remotePath}`);
1252
- } else {
1253
- rsyncArgs.push(`${serverConfig.user}@${serverConfig.host}:${remotePath}`);
1254
- rsyncArgs.push(rsyncLocalPath);
1255
- }
1255
+ // Add source and destination, behind "--" so neither can be an option
1256
+ rsyncArgs.push(...rsyncOperands(direction, rsyncLocalPath, `${serverConfig.user}@${serverConfig.host}:${remotePath}`));
1256
1257
 
1257
1258
  const rsyncProcess = spawn(rsyncCommand, rsyncArgs, {
1258
1259
  stdio: ['ignore', 'pipe', 'pipe'],
package/src/rsync-path.js CHANGED
@@ -71,3 +71,21 @@ export function toRsyncLocalPath(localPath, options = {}) {
71
71
 
72
72
  return rsyncPath;
73
73
  }
74
+
75
+ /**
76
+ * The two paths of an rsync transfer, in rsync's order, behind "--".
77
+ *
78
+ * Each path is a caller's word. rsync reads an operand that starts with "-" as
79
+ * one of its own options, and `--rsh=<command>` makes it run that command on
80
+ * this machine to open the connection (GHSA-m727-8qhq-9f7f). ssh_sync refuses
81
+ * such a path before it gets here; "--" ends rsync's options as well, so that
82
+ * a path can never be one, whatever reaches this point.
83
+ *
84
+ * @param {'push'|'pull'} direction
85
+ * @param {string} localPath - The local path as rsync must see it (toRsyncLocalPath)
86
+ * @param {string} remoteTarget - user@host:path
87
+ * @returns {string[]}
88
+ */
89
+ export function rsyncOperands(direction, localPath, remoteTarget) {
90
+ return direction === 'push' ? ['--', localPath, remoteTarget] : ['--', remoteTarget, localPath];
91
+ }
package/.eslintignore DELETED
@@ -1,5 +0,0 @@
1
- # Third-party code shipped as-is. Linting it would report thousands of style
2
- # issues in a file we must not edit — the point of vendoring is that it stays
3
- # byte-identical to what upstream published.
4
- vendor/
5
- node_modules/