NewApp Monitoring is liveSign up free
AgentbeamBeta
AI agent vulnerability · Other MCP servers and tools

GHSA-j7h9-2jh7-g967: mcp-ssh-tool has file transfer path policy bypass and bearer token comparison hardening

highCVSS 4.0 8.7

mcp-ssh-tool, an MCP server that gives AI agents SSH access, has a local path policy bypass in its file transfer handling and a non-constant-time bearer token comparison on its HTTP transport. Versions 2.1.0 and earlier are affected. Version 2.1.1 fixes both. The path bypass applies only under specific configurations.

Published May 7, 2026 · Updated Aug 16, 2026 · Analysis Oct 28, 2026

What an attacker can do

The npm package mcp-ssh-tool lets an MCP client move files between the local machine and SSH hosts. It enforces a local path policy with deny prefixes. Before 2.1.1, the deny-prefix checks did not canonicalize paths fully and did not respect path segment boundaries. A crafted local path could slip past the deny list, and transfer-related filesystem handling did not enforce the policy strongly enough. This is the CWE-22 part.

The second flaw is CWE-208. The HTTP transport compared the bearer token with a method that is not constant-time. A network attacker who can reach the HTTP port can measure response times to learn the token. This affects only HTTP deployments, not stdio.

In practice, a prompt-injected or malicious MCP client could read or write local files that the policy meant to protect. The CVSS v4 vector rates the integrity impact high and needs no privileges, with the advisory limiting the path bypass to specific configurations. An HTTP server exposed beyond loopback adds the timing attack on the token, which would hand the attacker the same transfer tools.

Who is affected

mcp-ssh-tool 2.1.0 and earlier, from the npm registry. The path issue depends on your filesystem policy settings. The timing issue matters only if you run the HTTP transport. Check your install:

npm ls -g mcp-ssh-tool

mcp-ssh-tool

Ecosystem
npm
Affected
<= 2.1.0
Fixed in
2.1.1
Check
npm ls mcp-ssh-tool

How to fix it

Upgrade to mcp-ssh-tool 2.1.1 or later:

npm install -g mcp-ssh-tool@latest

If you cannot upgrade yet, the advisory lists these workarounds:

  • Do not expose the HTTP transport beyond loopback.
  • Use a strict filesystem policy configuration.
  • Do not give MCP clients access to sensitive local transfer paths.
  • Monitor audit logs for unexpected transfer operations.

How to tell if you were hit

Review the tool's audit logs for transfer operations that touch local paths outside the directories you intended, especially paths with odd segments, repeated separators or ... For HTTP deployments, look in access logs for many rapid authentication failures from one address, which is how a timing attack looks. Rotate the bearer token if the port was reachable from other hosts. Beam records agent MCP tool calls and shell commands, so its rules can flag transfers of sensitive paths made by an agent.

Original advisory

From the GitHub Advisory Database (CC BY 4.0).

Summary

mcp-ssh-tool has released version 2.1.1 with security hardening for transfer path authorization and HTTP bearer authentication.

The release addresses:

  • insufficient local path policy enforcement in transfer-related filesystem handling
  • incomplete canonicalization and segment-boundary handling for deny-prefix path policy checks
  • non-constant-time HTTP bearer token comparison

Impact

Affected versions may allow policy bypass in transfer path handling under specific configurations, and may expose a timing side channel in bearer-token comparison for HTTP deployments.

Patched Version

Upgrade to mcp-ssh-tool >= 2.1.1.

npm install -g mcp-ssh-tool@latest

Workarounds

For deployments that cannot immediately upgrade:

  • avoid exposing HTTP transport beyond loopback
  • use strict filesystem policy configuration
  • avoid granting MCP clients access to sensitive local transfer paths
  • monitor audit logs for unexpected transfer operations

Credits

Reported by dodge1218.

Questions

Is mcp-ssh-tool 2.1.0 affected by GHSA-j7h9-2jh7-g967?

Yes. Every version up to and including 2.1.0 is affected. The patched version is 2.1.1.

Does the timing issue affect stdio use?

The advisory ties the bearer token comparison to HTTP deployments. It recommends keeping the HTTP transport on loopback if you cannot upgrade.

Does this advisory have a CVE?

No. The advisory is tracked only as GHSA-j7h9-2jh7-g967 and no CVE is assigned.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. The analysis is written by an AI model from the sources listed above and checked by automated rules before it is published. Check versions against the vendor's advisory before you act. Methodology

More Other MCP servers and tools vulnerabilities

All Other MCP servers and tools entries