<?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>@Evomap/Evolver (&lt;= 1.70.0-Beta.4) — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/@evomap/evolver--1.70.0-beta.4/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata — refreshed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 03 Jan 2024 12:00:00 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/@evomap/evolver--1.70.0-beta.4/feed.xml" rel="self" type="application/rss+xml"/><item><title>Evomap Evolver Validator RCE via NPM/NPX in Sandbox Allowlist</title><link>https://feed.craftedsignal.io/briefs/2024-01-evomap-rce/</link><pubDate>Wed, 03 Jan 2024 12:00:00 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2024-01-evomap-rce/</guid><description>The validator-mode sandbox executor in @evomap/evolver versions 1.70.0-beta.4 and earlier places `npm` and `npx` in its executable allowlist, allowing arbitrary code execution because validator nodes consume unsigned Hub responses without signature checks, leading to remote code execution on every validator node via lifecycle scripts.</description><content:encoded><![CDATA[<p>A vulnerability exists in the @evomap/evolver package, specifically affecting versions up to 1.70.0-beta.4. The flaw stems from the inclusion of <code>npm</code> and <code>npx</code> in the validator-mode sandbox executor&rsquo;s allowlist. This oversight permits an attacker who compromises or intercepts communications with the Hub to achieve remote code execution (RCE) on every validator node. The issue arises because the <code>validation_commands</code> strings fetched from the Hub are not subject to signature verification before being passed to the sandbox. The vulnerability has been present since validator mode was enabled by default in v1.69.0. Attackers can exploit this by injecting malicious commands through the Hub, leveraging <code>npm</code> and <code>npx</code> to execute arbitrary code via lifecycle scripts or remote package execution. This poses a significant risk to the integrity and security of validator nodes within the evolver network.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>The validator node POSTs a request to the Hub&rsquo;s <code>/a2a/fetch</code> endpoint to retrieve <code>validation_tasks</code>.</li>
<li>The Hub responds with a JSON payload containing a <code>validation_tasks</code> array, including <code>task.validation_commands</code> strings, without signature verification.</li>
<li>The validator extracts the <code>task.validation_commands</code> array (controlled by the attacker) and passes it to <code>runInSandbox</code>.</li>
<li><code>runInSandbox</code> processes each command in the array, checking against <code>ALLOWED_EXECUTABLES</code> which includes <code>npm</code> and <code>npx</code>.</li>
<li>When <code>npm</code> or <code>npx</code> commands are present, they bypass <code>assertNodeCommandSafe</code>, which would normally block dangerous Node.js flags.</li>
<li>The <code>npm</code> command, such as <code>npm install &lt;malicious_package&gt;</code>, is executed, triggering the package&rsquo;s <code>preinstall</code>, <code>install</code>, and <code>postinstall</code> scripts. Alternatively, <code>npx</code> can be used to fetch and execute a remote package&rsquo;s <code>bin</code> entry.</li>
<li>These scripts execute arbitrary code within the validator process&rsquo;s context, enabling the attacker to perform malicious actions.</li>
<li>The validator continues its normal operations, polling the Hub every 60 seconds, potentially re-triggering the exploit with updated malicious commands.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation leads to arbitrary code execution as the evolver/validator process UID on every validator node that communicates with a compromised Hub, which occurs by default every 60 seconds. This can result in the exfiltration of sensitive credentials, including HUB_NODE_SECRET and A2A node identity. Furthermore, attackers can achieve persistence by writing to cron jobs, systemd units, or shell RC files and potentially pivot into the host&rsquo;s container or VM. Due to the default-on validator mode since v1.69.0, the vulnerability is wormable across the network, as a single Hub compromise can auto-RCE every node. The compromised Hub can also lead to denial of service.</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Immediately remove <code>npm</code> and <code>npx</code> from the <code>ALLOWED_EXECUTABLES</code> list in <code>src/gep/validator/sandboxExecutor.js</code> as shown in the advisory.</li>
<li>Implement signature verification for the Hub&rsquo;s <code>/a2a/fetch</code> response to prevent MITM attacks, as described in the advisory.</li>
<li>Deploy the Sigma rule &ldquo;Detect NPM Install from Unusual Processes&rdquo; to identify potential exploitation attempts using <code>npm install</code> commands originating from unexpected parent processes.</li>
<li>Deploy the Sigma rule &ldquo;Detect NPX Execution from Unusual Processes&rdquo; to identify potential exploitation attempts using <code>npx</code> commands originating from unexpected parent processes.</li>
</ul>
]]></content:encoded><category domain="severity">critical</category><category domain="type">advisory</category><category>rce</category><category>sandbox-escape</category><category>npm</category><category>npx</category><category>supply-chain</category></item></channel></rss>