{"answers":{"affected":"2 open source packages ship an affected version, including @aiondadotcom/mcp-ssh.","exploited":"There is no known exploitation of GHSA-p4h8-56qp-hpgv in the wild and no public exploit code.","fix":"Upgrade @aiondadotcom/mcp-ssh to 1.3.5 or later.","what":"GHSA-p4h8-56qp-hpgv is a command injection vulnerability in @aiondadotcom/mcp-ssh, published on 14 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-p4h8-56qp-hpgv and fix it if it is affected.\n\nWhat it is: GHSA-p4h8-56qp-hpgv is a command injection vulnerability in @aiondadotcom/mcp-ssh, published on 14 Apr 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-p4h8-56qp-hpgv in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @aiondadotcom/mcp-ssh (npm): affected all versions; fixed in 1.3.5\n- @aiondadotcom/mcp-ssh (npm): affected all versions; fixed in 1.3.5\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/GHSA-p4h8-56qp-hpgv/ (Markdown: https://insights.sbomify.com/GHSA-p4h8-56qp-hpgv/index.md)","id":"GHSA-p4h8-56qp-hpgv","markdown":"https://insights.sbomify.com/GHSA-p4h8-56qp-hpgv/index.md","name":"GHSA-p4h8-56qp-hpgv","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution","data_read"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"MCP SSH library","requires_auth":"none","summary":"An attacker can achieve local remote code execution and read sensitive files by injecting SSH options via prompt injection into the MCP server's LLM.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"## Impact\n\nA crafted `hostAlias` argument such as `-oProxyCommand=...` was passed to `ssh`/`scp` without an argument terminator. SSH interprets arguments starting with `-` as options regardless of position, so the option-injection caused SSH to execute the attacker-supplied `ProxyCommand` **locally** on the machine running the MCP server — before any network connection. This bypassed the documented protection of `# @password:` annotations and exposed local SSH keys, browser cookies, other MCP server credentials, and anything else readable by the server process.\n\nA second local-RCE vector existed on Windows: `spawn(..., { shell: true })` was used so that `ssh.exe`/`scp.exe` could be found via `PATH`. With `shell: true`, every argument is re-parsed by `cmd.exe`, so shell metacharacters (`\u0026`, `|`, `^`, `\u003e`, `\"`, `;`, …) in `hostAlias`, `command`, `localPath` or `remotePath` would have been interpreted by `cmd.exe` and could have triggered arbitrary local command execution on Windows.\n\nThe MCP server runs locally over STDIO, but the LLM driving it is not trusted: its tool arguments can be steered by **prompt injection** from any untrusted text the LLM ingests (web pages, e-mails, repository files, output of other MCP servers). The attack does not require a malicious user — only that the LLM ingests attacker-controlled text at any point during the session.\n\n## Patches\n\nFixed in **1.3.5**.\n\n- Add `--` argument terminator to all `ssh`/`scp` invocations.\n- Strict whitelist for `hostAlias` (rejects leading `-` and shell metacharacters).\n- Known-host check: every `hostAlias` must be defined in `~/.ssh/config` (including `Include` directives) or present in `~/.ssh/known_hosts`.\n- Resolve `ssh.exe`/`scp.exe` to absolute paths and use `shell: false` everywhere on Windows.\n\n## Workarounds\n\nNone. Upgrade to 1.3.5.\n\n## Credit\n\nReported by Pico (@piiiico) as part of an MCP server security audit.","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"SSH/SCP option injection allowing local RCE in @aiondadotcom/mcp-ssh","id":"GHSA-p4h8-56qp-hpgv","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["1.3.5"],"introduced":["0"],"last_affected":[],"package":"@aiondadotcom/mcp-ssh","purl":null,"source":"GHSA-p4h8-56qp-hpgv"},{"ecosystem":"npm","fixed":["1.3.5"],"introduced":["0"],"last_affected":[],"package":"@aiondadotcom/mcp-ssh","purl":"pkg:npm/%40aiondadotcom/mcp-ssh","source":"GHSA-p4h8-56qp-hpgv"}],"products":null,"published":"2026-04-14","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"An attacker can achieve local remote code execution and read sensitive files by injecting SSH options via prompt injection into the MCP server's LLM.","url":"https://insights.sbomify.com/GHSA-p4h8-56qp-hpgv/"}