本文へ移動
English version →
高 8.7

mcp-ssh-managerにSSH先で任意のコマンドを実行される脆弱性

CVE-2026-77383 SecPulse初出

概要

mcp-ssh-managerのデータベース操作用の関数に、コマンドインジェクションの脆弱性が見つかりました。3.6.7より前のバージョンでは、細工した引数を渡すと、MCPサーバーが使うアカウントで設定済みのSSH接続先上の任意のコマンドが実行されるおそれがあります。読み取り専用モードでも、ssh_db_listを経由して影響を受けるため、3.6.7以降へ更新してください。

AI要約

SecPulse が外部の生成 AI を使って作った要約です。誤りを含むことがあります。重要な判断の前に、下の原文と参照URLを確認してください。

mcp-ssh-managerのデータベース操作用の関数に、コマンドインジェクションの脆弱性が見つかりました。3.6.7より前のバージョンでは、細工した引数を渡すと、MCPサーバーが使うアカウントで設定済みのSSH接続先上の任意のコマンドが実行されるおそれがあります。読み取り専用モードでも、ssh_db_listを経由して影響を受けるため、3.6.7以降へ更新してください。

影響パッケージ

パッケージ影響を受ける版 → 修正版
bvisiblemcp-ssh-manager —
npmmcp-ssh-manager
3.6.7 未満→ 3.6.7
原文の説明 取得元が公開している説明をそのまま載せています (多くは英語)。

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 SQL clause.

Workarounds

Upgrade to 3.6.7. If appl…

出典: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

参照URL

当サイトでは、アクセス解析と広告の効果測定のためにCookieを使います。株式会社Gameのサイト共通の設定です。 詳しく