<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Mcp-Ssh-Tool — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/mcp-ssh-tool/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Tue, 02 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/mcp-ssh-tool/feed.xml" rel="self" type="application/rss+xml"/><item><title>mcp-ssh-tool Path Traversal and Timing Attack Vulnerabilities</title><link>https://feed.craftedsignal.io/briefs/2024-01-mcp-ssh-tool-vulns/</link><pubDate>Tue, 02 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-mcp-ssh-tool-vulns/</guid><description>mcp-ssh-tool versions 2.1.0 and earlier have a policy bypass in transfer path handling and expose a timing side channel in bearer-token comparison for HTTP deployments, addressed in version 2.1.1.</description><content:encoded><![CDATA[<p>Versions 2.1.0 and earlier of <code>mcp-ssh-tool</code>, a tool often used in CI/CD environments, contain security vulnerabilities related to file transfer path authorization and HTTP bearer authentication. Specifically, the tool suffers from insufficient local path policy enforcement in transfer-related filesystem handling, leading to potential bypasses of configured path restrictions. Additionally, a non-constant-time HTTP bearer token comparison exposes a timing side channel. The vulnerability allows attackers with sufficient access to potentially read or write files outside of their intended scope. Upgrade to version 2.1.1 or implement provided workarounds to mitigate risks.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker gains access to an MCP client, either through compromised credentials or a vulnerable service.</li>
<li>The attacker crafts a file transfer request with a manipulated path, exploiting insufficient canonicalization in the <code>mcp-ssh-tool</code>&rsquo;s path policy checks.</li>
<li>The crafted path bypasses the configured deny-prefix path policy.</li>
<li>The attacker initiates a file transfer operation targeting a restricted file system location.</li>
<li>The <code>mcp-ssh-tool</code> incorrectly authorizes the transfer due to the policy bypass.</li>
<li>The attacker successfully reads or writes files outside of the intended scope.</li>
<li>In HTTP deployments, an attacker attempts to authenticate using a brute-force approach, leveraging timing differences in bearer token comparison.</li>
<li>By analyzing response times, the attacker identifies valid token characters and reconstructs the valid bearer token over time.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of the path traversal vulnerability could allow unauthorized access to sensitive files and directories on the server. The timing side channel vulnerability in bearer token comparison could lead to unauthorized access to the system via HTTP. The severity of the impact is dependent on the file system permissions and sensitivity of the data exposed.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Upgrade to <code>mcp-ssh-tool &gt;= 2.1.1</code> to remediate both the path traversal and timing attack vulnerabilities.</li>
<li>For deployments that cannot immediately upgrade, avoid exposing HTTP transport beyond loopback to mitigate the timing attack.</li>
<li>Implement strict filesystem policy configuration as described in the <code>mcp-ssh-tool</code> documentation to minimize the risk of path traversal.</li>
<li>Monitor audit logs for unexpected transfer operations to identify and respond to potential exploit attempts.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path-traversal</category><category>timing-attack</category><category>npm</category></item></channel></rss>