CVE-2026-77383: mcp-ssh-manager Command Injection Vulnerability

HIGH
Advisory Identifier: GHSA-4jx9-2fwj-pg4j
CWE-78
Published
Advisory Summary

CVE-2026-77383 is a HIGH command injection vulnerability (CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')) affecting mcp-ssh-manager libraries in the npm ecosystem. The issue involves command injection in database helpers (ssh_db_list / ssh_db_dump / ssh_db_import). Remediation is available by upgrading affected packages to version 3.6.7.

CVE-2026-77383 at a Glance

CVE Identifier CVE-2026-77383
GHSA Identifier GHSA-4jx9-2fwj-pg4j
Severity HIGH
CVSS v3.1 Base Score N/A
CWE Classification CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Affected Product mcp-ssh-manager
Package Ecosystem npm
Published Date
Last Updated

How to Fix CVE-2026-77383

To remediate this vulnerability, upgrade all affected mcp-ssh-manager dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

mcp-ssh-manager fixed: 3.6.7
npm install mcp-ssh-manager@3.6.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

npm ls mcp-ssh-manager

How to Check if You Are Affected

To determine whether your Node.js application is affected by CVE-2026-77383, inspect your project dependencies using npm:

npm ls mcp-ssh-manager

Analyze the terminal output to locate any version of mcp-ssh-manager in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.6.7), your application is affected.

Note: The npm ls mcp-ssh-manager command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection'), where the product constructs all or part of an os command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended os command when it is sent to a downstream component. In mcp-ssh-manager, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact Every `ssh_db_*` tool argument — `database`, `table`, `collection`, output/input file paths, and the `user` / `host` / `port` / `password` connection fields — arrives from tool-call parameters and was interpolated directly into a **shell-evaluated** command string in `src/database-manager.js`. A caller able to invoke a database tool with a crafted value (`$(...)`, backticks, `; cmd`, `| cmd`, `&& cmd`, bare `> file`) achieves **arbitrary command execution on the configured SSH target**, under the account the MCP server uses. The strongest path is **`ssh_db_list`**: it is documented and classified as read-only, so it remained **allowed in the `readonly` and `restricted`** per-server security modes while still reaching an injectable builder — bypassing the boundary those modes are meant to enforce. `ssh_db_dump` / `ssh_db_import` are blocked in `readonly` but remain injectable in the default `unrestricted` mode. The earlier v3.6.5 fix (#44) only hardened `ssh_db_query`'s query *text* via a single-quoted heredoc; the list/dump/import/restore builders — and the query builders' connection flags — were not covered. ### Patches Fixed in **3.6.7**. A centralized `shellQuote()` (single-quote wrapping + `'\''` escaping) now wraps every interpolated caller-controlled value across all 15 database builders. The MySQL list-tables database is passed as a shell-quoted positional argument instead of an interpolated `USE <db>` SQL clause. ### Workarounds Upgrade to 3.6.7. If applications cannot upgrade immediately, avoid exposing the `ssh_db_*` tools (disable the `database` tool group) and do not rely on `readonly` / `restricted` modes to contain a caller that can reach `ssh_db_list`. ### Credits Responsibly disclosed by **Ugur Ozer, Aeon AI Risk Management** (http://airiskmanagement.ca). mcp-ssh-manager thanks them for the private, well-documented report.

CVE-2026-77383 Affected mcp-ssh-manager Versions

1 component(s)
Fixed Versions:
3.6.7
Product / Package Ecosystem Affected Versions Fixed Version
mcp-ssh-manager
npm
< 3.6.7
3.6.7

References

Frequently Asked Questions

What is CVE-2026-77383?
CVE-2026-77383 is a security vulnerability in mcp-ssh-manager involving Command injection in database helpers (ssh_db_list / ssh_db_dump / ssh_db_import) under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection').
Which mcp-ssh-manager versions are affected?
Affected versions include releases prior to 3.6.7 across affected packages: mcp-ssh-manager.
What version fixes CVE-2026-77383?
Upgrading to 3.6.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is mcp-ssh-manager affected?
Yes, mcp-ssh-manager is affected in releases prior to 3.6.7. Upgrade your dependency to 3.6.7 or later.
What CWE is associated with CVE-2026-77383?
CVE-2026-77383 is classified under CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') (The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.).
How can I check npm dependencies for CVE-2026-77383?
Run the dependency tree command: 'npm ls mcp-ssh-manager'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4jx9-2fwj-pg4j",
  "modified" : "2026-11-30T19:52:12Z",
  "published" : "2026-11-30T19:52:11Z",
  "aliases" : [ "CVE-2026-77383" ],
  "summary" : "mcp-ssh-manager: Command injection in database helpers (ssh_db_list / ssh_db_dump / ssh_db_import)",
  "details" : "### Impact\n\nEvery `ssh_db_*` tool argument — `database`, `table`, `collection`, output/input file paths, and the `user` / `host` / `port` / `password` connection fields — arrives from tool-call parameters and was interpolated directly into a **shell-evaluated** command string in `src/database-manager.js`. A caller able to invoke a database tool with a crafted value (`$(...)`, backticks, `; cmd`, `| cmd`, `&& cmd`, bare `> file`) achieves **arbitrary command execution on the configured SSH target**, under the account the MCP server uses.\n\nThe strongest path is **`ssh_db_list`**: it is documented and classified as read-only, so it remained **allowed in the `readonly` and `restricted`** per-server security modes while still reaching an injectable builder — bypassing the boundary those modes are meant to enforce. `ssh_db_dump` / `ssh_db_import` are blocked in `readonly` but remain injectable in the default `unrestricted` mode.\n\nThe earlier v3.6.5 fix (#44) only hardened `ssh_db_query`'s query *text* via a single-quoted heredoc; the list/dump/import/restore builders — and the query builders' connection flags — were not covered.\n\n### Patches\n\nFixed in **3.6.7**. A centralized `shellQuote()` (single-quote wrapping + `'\\''` escaping) now wraps every interpolated caller-controlled value across all 15 database builders. The MySQL list-tables database is passed as a shell-quoted positional argument instead of an interpolated `USE <db>` SQL clause.\n\n### Workarounds\n\nUpgrade to 3.6.7. If applications cannot upgrade immediately, avoid exposing the `ssh_db_*` tools (disable the `database` tool group) and do not rely on `readonly` / `restricted` modes to contain a caller that can reach `ssh_db_list`.\n\n### Credits\n\nResponsibly disclosed by **Ugur Ozer, Aeon AI Risk Management** (http://airiskmanagement.ca). mcp-ssh-manager thanks them for the private, well-documented report.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "npm",
      "name" : "mcp-ssh-manager"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "3.6.7"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 3.6.6"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/bvisible/mcp-ssh-manager/security/advisories/GHSA-4jx9-2fwj-pg4j"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-77383"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bvisible/mcp-ssh-manager/pull/51"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bvisible/mcp-ssh-manager/commit/4c19b350f36f5f09f15662f8d19d2ba9cdf38bd0"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/bvisible/mcp-ssh-manager"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/bvisible/mcp-ssh-manager/releases/tag/v3.6.7"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-78" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-11-30T19:52:11Z",
    "nvd_published_at" : "2026-11-20T19:18:55Z"
  }
}