<?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/" xmlns:webfeeds="http://webfeeds.org/rss/1.0"><channel><title>Mcp-Sanitizer (V1.3.3) - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/mcp-sanitizer-v1.3.3/</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>Thu, 29 Oct 2026 00:17:51 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/mcp-sanitizer-v1.3.3/feed.xml" rel="self" type="application/rss+xml"/><image><url>https://feed.craftedsignal.io/favicon-32x32.png</url><title>CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/</link><width>32</width><height>32</height></image><webfeeds:icon>https://feed.craftedsignal.io/favicon.svg</webfeeds:icon><item><title>mcp-sanitizer: Path Traversal via Improper Home Directory Validation</title><link>https://feed.craftedsignal.io/briefs/2026-10-mcp-sanitizer-path-traversal/</link><pubDate>Thu, 29 Oct 2026 00:17:51 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-10-mcp-sanitizer-path-traversal/</guid><description>The mcp-sanitizer library v1.3.3 permits path traversal by whitelisting /home/ and /Users/ in its validation logic, allowing unauthenticated attackers to read sensitive user configuration files.</description><content:encoded><![CDATA[<p>The mcp-sanitizer library v1.3.3 contains a critical path traversal vulnerability (CWE-22) in its <code>validateFilePath</code> function within <code>src/utils/validation-utils.js</code>. The library implementation includes an overly permissive allowlist for absolute file paths, explicitly permitting any path starting with <code>/home/</code> or <code>/Users/</code>. Consequently, security validation fails to block access to highly sensitive files such as SSH keys, AWS credentials, and Kubernetes configurations.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>Attacker sends a POST request to an MCP-enabled application using the <code>mcp-sanitizer</code> middleware.</li>
<li>The application passes an attacker-supplied <code>file_path</code> to <code>sanitizer.sanitize()</code>.</li>
<li>The <code>validateFilePath</code> function normalizes the input and performs an allowlist check.</li>
<li>Because the malicious path (e.g., <code>/home/victim/.ssh/id_rsa</code>) matches the hardcoded <code>/home/</code> prefix, the validator returns <code>blocked=false</code>.</li>
<li>The library returns the path to the consumer application as a &quot;trusted&quot; sanitized value.</li>
<li>The consumer application, trusting the sanitizer's output, performs a filesystem read operation (e.g., <code>fs.readFile</code>) on the attacker-controlled path.</li>
<li>The application returns the contents of the sensitive file to the attacker in the HTTP response.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows unauthenticated remote attackers to exfiltrate sensitive user-home directory files, including SSH private keys, cloud provider credentials, and application tokens. This results in complete confidentiality loss for the affected user's data and potential lateral movement into cloud infrastructure or remote systems.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Update any application utilizing <code>mcp-sanitizer</code> to implement strict path validation that excludes sensitive home directory sub-paths, even if the library is not updated.</li>
<li>Implement a secondary layer of path validation in the application logic that explicitly denies access to <code>.ssh</code>, <code>.aws</code>, <code>.gnupg</code>, <code>.kube</code>, <code>.config</code>, and <code>.env</code> files regardless of the sanitizer output.</li>
<li>Audit all MCP server implementations for dependencies on <code>mcp-sanitizer</code> and restrict access to the <code>/tool</code> endpoint to authenticated and authorized users only.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category></item></channel></rss>