<?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>Jordan Burke - CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/vendors/jordan-burke/</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, 10 Sep 2026 00:51:11 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/vendors/jordan-burke/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>Remote Code Execution in functype-mcp-server via Unsanitized MCP Tool Input</title><link>https://feed.craftedsignal.io/briefs/2026-09-functype-mcp-rce/</link><pubDate>Thu, 10 Sep 2026 00:51:11 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-09-functype-mcp-rce/</guid><description>The set_functype_version MCP tool in functype-mcp-server allows unauthenticated attackers to execute arbitrary code by passing a malicious package alias to pnpm, which the server subsequently executes via dynamic import.</description><content:encoded><![CDATA[<p>The <code>functype-mcp-server</code> tool <code>set_functype_version</code> (v1.4.3) is vulnerable to Remote Code Execution (RCE) because it fails to sanitize user input before passing it to the <code>pnpm add</code> command. An attacker can supply a specially crafted version string, such as <code>file:/path/to/malicious_package</code> or other npm-supported alias syntaxes, to force the server to install an arbitrary local or remote package as the <code>functype</code> dependency. Immediately following this installation, the server triggers <code>initDocsData(true)</code>, which dynamically imports the <code>functype/cli</code> module from the newly created installation path. This process executes any module-level JavaScript contained within the attacker's package with the full privileges of the MCP server process. This vulnerability is particularly dangerous for AI coding agents that automatically invoke MCP tools based on prompts, as it allows for indirect prompt injection to achieve full system compromise.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker sends a <code>tools/call</code> MCP request for <code>set_functype_version</code> to an exposed MCP server.</li>
<li>The input <code>version</code> argument, containing a malicious alias like <code>file:/tmp/evil</code>, is accepted by the server without validation (line 120, <code>index.ts</code>).</li>
<li>The server constructs a package specifier string <code>functype@file:/tmp/evil</code> (line 123, <code>index.ts</code>).</li>
<li>The server executes <code>execFileSync(&quot;pnpm&quot;, [&quot;add&quot;, spec], ...)</code> which installs the malicious directory as the <code>functype</code> package (line 125, <code>index.ts</code>).</li>
<li>The server process calls the <code>initDocsData(true)</code> function immediately after the installation finishes.</li>
<li>The server invokes <code>require.resolve(&quot;functype/cli&quot;)</code>, which resolves to the path of the newly installed attacker package.</li>
<li>The server calls <code>import()</code> on the resolved path, causing the Node.js runtime to execute the attacker's module code.</li>
<li>The attacker-controlled script performs malicious actions, such as reading environment variables or exfiltrating data, resulting in RCE.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation results in full Remote Code Execution with the privileges of the MCP server process. This impacts confidentiality, integrity, and availability. Victims include developers using the server as an AI coding assistant and environments where AI agents connect to this MCP server, enabling potential exploitation via indirect prompt injection from malicious documentation or web content.</p>
<h2 id="recommendation">Recommendation</h2>
<ol>
<li>Upgrade <code>functype-mcp-server</code> to a patched version that validates the <code>version</code> argument against an allowlist (e.g., regex for semver or dist-tags) and rejects alias syntaxes like <code>file:</code>, <code>npm:</code>, or URL paths.</li>
<li>Modify the <code>pnpm add</code> execution logic to include the <code>--ignore-scripts</code> flag to mitigate potential execution of arbitrary pre/post-install scripts, though this does not fix the dynamic import sink.</li>
<li>Restrict access to the MCP server by implementing authentication or by running the server in an isolated, non-privileged container with minimal access to the host filesystem.</li>
</ol>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>remote-code-execution</category><category>mcp</category><category>nodejs</category></item></channel></rss>