{"id":"CVE-2026-77383","aliases":["CVE-2026-77383","GHSA-4jx9-2fwj-pg4j"],"related":[],"kind":"vulnerability","state":"published","title":"mcp-ssh-manager: Command injection in mcp-ssh-manager database helpers (ssh_db_list / ssh_db_dump / ssh_db_import)","summary":"mcp-ssh-manager is an MCP server for managing servers over SSH with human approval, an encrypted vault, and a live audit trail. Prior to 3.6.7, ssh_db_list, ssh_db_dump, ssh_db_import, and ssh_db_restore in src/database-manager.js interpolate caller-controlled database, table, collection, file path, user, host, port, and password values into shell-evaluated command strings without neutralization. Shell metacharacters in these arguments therefore execute arbitrary commands on the configured SSH target as the account used by the MCP server. ssh_db_list is classified as read-only and remains available in readonly and restricted server security modes, so this path bypasses the command-execution boundary those modes are intended to enforce. The dump and import builders are blocked in readonly mode but remain vulnerable in the default unrestricted mode. The earlier version 3.6.5 hardening covered only ssh_db_query query text; it did not protect the list, dump, import, or restore builders, or the connection flags used by query builders. This issue is fixed in version 3.6.7.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"mcp-ssh-manager is an MCP server for managing servers over SSH with human approval, an encrypted vault, and a live audit trail. Prior to 3.6.7, ssh_db_list, ssh_db_dump, ssh_db_import, and ssh_db_restore in src/database-manager.js interpolate caller-controlled database, table, collection, file path, user, host, port, and password values into shell-evaluated command strings without neutralization. Shell metacharacters in these arguments therefore execute arbitrary commands on the configured SSH target as the account used by the MCP server. ssh_db_list is classified as read-only and remains available in readonly and restricted server security modes, so this path bypasses the command-execution boundary those modes are intended to enforce. The dump and import builders are blocked in readonly mode but remain vulnerable in the default unrestricted mode. The earlier version 3.6.5 hardening covered only ssh_db_query query text; it did not protect the list, dump, import, or restore builders, or the connection flags used by query builders. This issue is fixed in version 3.6.7.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"}],"published":"2026-11-20T18:07:53.444Z","modified":"2026-11-30T20:00:05.897Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"HIGH"}],"cwes":["CWE-78"],"affected":[{"ranges":[{"version":"< 3.6.7","status":"affected"}],"vendor":"bvisible","product":"mcp-ssh-manager","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"3.6.7"}],"ecosystem":"npm","package":"mcp-ssh-manager","purl":"pkg:npm/mcp-ssh-manager","source":"ghsa"}],"references":[{"url":"https://github.com/bvisible/mcp-ssh-manager/security/advisories/GHSA-4jx9-2fwj-pg4j","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/bvisible/mcp-ssh-manager/pull/51","tags":["exploit","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/bvisible/mcp-ssh-manager/commit/4c19b350f36f5f09f15662f8d19d2ba9cdf38bd0","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/bvisible/mcp-ssh-manager/releases/tag/v3.6.7","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77383","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/bvisible/mcp-ssh-manager","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"no","technicalImpact":"total","date":"2026-11-25T04:20:46.350Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-77383","url":"https://www.cve.org/CVERecord?id=CVE-2026-77383","licence":"CVE Terms of Use","modified":"2026-11-25T04:21:26.697Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-4jx9-2fwj-pg4j","url":"https://github.com/advisories/GHSA-4jx9-2fwj-pg4j","licence":"CC-BY-4.0","modified":"2026-11-30T20:00:05.897Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-77383","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-77383","licence":"Public domain","modified":"2026-11-25T05:18:38.960Z"}],"updatedAt":"2026-11-30T20:27:24.998Z","epss":{"score":0.00703,"percentile":0.54521,"date":"2026-12-01T12:00:22.000Z"}}