<?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>9router (&gt;= 0.4.30, &lt; 0.4.37) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/9router--0.4.30--0.4.37/</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, 19 May 2026 19:22:37 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/9router--0.4.30--0.4.37/feed.xml" rel="self" type="application/rss+xml"/><item><title>9router Unauthenticated Remote Code Execution via MCP Plugin Routes</title><link>https://feed.craftedsignal.io/briefs/2026-05-9router-rce/</link><pubDate>Tue, 19 May 2026 19:22:37 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-9router-rce/</guid><description>9router versions 0.4.30 to 0.4.33 are vulnerable to unauthenticated remote code execution, allowing network-adjacent attackers to execute arbitrary OS commands by registering and triggering malicious plugins through unprotected API endpoints.</description><content:encoded><![CDATA[<p>9router versions 0.4.30 through 0.4.33 are susceptible to an unauthenticated remote code execution vulnerability due to insufficient access control on the <code>/api/cli-tools/*</code> and <code>/api/mcp/*</code> API endpoints. Introduced in commit <code>8f4d29c</code> on 2026-05-11 with the addition of the MCP stdio→SSE bridge feature, this flaw allows a network-adjacent attacker to register a malicious plugin containing arbitrary OS commands. These commands can then be executed by triggering a Server-Sent Events (SSE) endpoint, resulting in the execution of commands as the user running the 9router process. This vulnerability poses a significant risk, as it requires no authentication and can be exploited in under 2 seconds from the first request.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The attacker sends a POST request to the <code>/api/cli-tools/cowork-settings</code> endpoint to register a malicious plugin. This endpoint is not protected by the Next.js middleware.</li>
<li>The POST request contains a JSON payload with a <code>customPlugins</code> array. The <code>name</code>, <code>command</code>, and <code>args</code> fields within the plugin definition are attacker-controlled.</li>
<li>The server-side code in <code>src/app/api/cli-tools/cowork-settings/route.js</code> extracts the <code>command</code> and <code>args</code> from the JSON payload without proper validation.</li>
<li>The extracted <code>command</code> and <code>args</code> are then stored in the <code>globalThis.__9routerCustomPlugins</code> map using the <code>registerCustomPlugin</code> function in <code>src/lib/mcp/stdioSseBridge.js</code>.</li>
<li>The attacker sends a GET request to the <code>/api/mcp/[plugin]/sse</code> endpoint, where <code>[plugin]</code> is the name of the malicious plugin registered in the previous steps.</li>
<li>The server-side code in <code>src/app/api/mcp/[plugin]/sse/route.js</code> retrieves the plugin definition from the <code>globalThis.__9routerCustomPlugins</code> map using the provided plugin name.</li>
<li>The <code>spawn</code> function in <code>src/lib/mcp/stdioSseBridge.js</code> is called with the attacker-controlled <code>command</code> and <code>args</code> from the plugin definition.</li>
<li>The arbitrary OS command is executed on the server, allowing the attacker to perform actions such as writing files, establishing reverse shells, or exfiltrating sensitive data.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation of CVE-2026-46339 allows an unauthenticated attacker to achieve remote code execution on the 9router server. This can lead to full read access to the server&rsquo;s filesystem, including sensitive files such as API keys, TLS private keys, Anthropic tokens (<code>~/.claude/settings.json</code>), and AWS credentials (<code>~/.aws/credentials</code>, <code>~/.aws/sso/cache/*.json</code>). Attackers can also achieve arbitrary file write, persistence via cron/systemd, process termination, and resource exhaustion. The <code>docker</code> group membership may allow container escape leading to host root access.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Apply the provided remediation steps by patching the <code>src/proxy.js</code> file to extend the middleware matcher to include <code>/api/cli-tools/:path*</code> and <code>/api/mcp/:path*</code> to prevent unauthenticated access.</li>
<li>Implement input validation and sanitization for the <code>command</code> and <code>args</code> fields in the <code>registerCustomPlugin</code> function in <code>src/lib/mcp/stdioSseBridge.js</code> to prevent execution of arbitrary commands.</li>
<li>Sanitize the <code>customPlugins</code> at the API boundary in <code>src/app/api/cli-tools/cowork-settings/route.js</code> to ensure that only authorized commands are executed.</li>
<li>Deploy the Sigma rule &ldquo;Detect 9router Unauthenticated RCE via MCP Plugin Registration&rdquo; to identify attempts to register malicious plugins via the <code>/api/cli-tools/cowork-settings</code> endpoint.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>rce</category><category>unauthenticated</category><category>plugin</category></item></channel></rss>