Evomap Evolver Validator RCE via NPM/NPX in Sandbox Allowlist
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.
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 npm and npx in the validator-mode sandbox executor’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 validation_commands 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 npm and npx 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.
Attack Chain
- The validator node POSTs a request to the Hub’s
/a2a/fetchendpoint to retrievevalidation_tasks. - The Hub responds with a JSON payload containing a
validation_tasksarray, includingtask.validation_commandsstrings, without signature verification. - The validator extracts the
task.validation_commandsarray (controlled by the attacker) and passes it torunInSandbox. runInSandboxprocesses each command in the array, checking againstALLOWED_EXECUTABLESwhich includesnpmandnpx.- When
npmornpxcommands are present, they bypassassertNodeCommandSafe, which would normally block dangerous Node.js flags. - The
npmcommand, such asnpm install <malicious_package>, is executed, triggering the package’spreinstall,install, andpostinstallscripts. Alternatively,npxcan be used to fetch and execute a remote package’sbinentry. - These scripts execute arbitrary code within the validator process’s context, enabling the attacker to perform malicious actions.
- The validator continues its normal operations, polling the Hub every 60 seconds, potentially re-triggering the exploit with updated malicious commands.
Impact
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’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.
Recommendation
- Immediately remove
npmandnpxfrom theALLOWED_EXECUTABLESlist insrc/gep/validator/sandboxExecutor.jsas shown in the advisory. - Implement signature verification for the Hub’s
/a2a/fetchresponse to prevent MITM attacks, as described in the advisory. - Deploy the Sigma rule “Detect NPM Install from Unusual Processes” to identify potential exploitation attempts using
npm installcommands originating from unexpected parent processes. - Deploy the Sigma rule “Detect NPX Execution from Unusual Processes” to identify potential exploitation attempts using
npxcommands originating from unexpected parent processes.
Detection coverage 2
Detect NPM Install from Unusual Processes
highDetects npm install commands executed from unusual parent processes, potentially indicating exploitation attempts.
Detect NPX Execution from Unusual Processes
highDetects npx commands executed from unusual parent processes, potentially indicating exploitation attempts.
Detection queries are kept inside the platform. Get full rules →