Skip to content
CVE-2026-92948 Google Chronicle · YARA-L

Detect vm2 Sandbox Escape via node:test.run() execArgv Builtin Allowlist Bypass (CVE-2026-92948) in Google Chronicle

Detects exploitation and presence of CVE-2026-92948, a critical (CVSS 9.9) sandbox escape in the vm2 JavaScript sandbox library (versions >= 3.9.6, <= 3.11.6). The NodeVM builtin allowlist can be bypassed by abusing the `node:test` module's `run()` function, which accepts an `execArgv` option. Because vm2 permitted access to `node:test` and did not sanitize `execArgv`, an attacker could inject Node.js command-line flags (e.g. `--experimental-...`, `--require`, or `--eval` style arguments) into a child test runner process, breaking out of the sandbox and achieving arbitrary code execution on the host. This CWE-693 (Protection Mechanism Failure) flaw is fixed in vm2 3.11.7. Note vm2 is deprecated upstream; detection focuses on identifying vulnerable installs and runtime indicators of child-process/escape behavior originating from node processes that embed vm2.

MITRE ATT&CK

Tactic
Stealth Execution

YARA-L Detection Query

Google Chronicle (YARA-L)
yaral
// df00tech DF00-b907b994e8 · https://df00tech.com/detections/CVE-2026-92948 · licence: https://df00tech.com/detections/licence
rule vm2_node_test_execargv_escape_cve_2026_92948 {
  meta:
    author = "Argus Detection Platform"
    description = "Detects vm2 node:test execArgv sandbox escape (CVE-2026-92948)"
    severity = "CRITICAL"
    cve = "CVE-2026-92948"
  events:
    $e.metadata.event_type = "PROCESS_LAUNCH"
    re.regex($e.principal.process.file.full_path, `(?i)node(\.exe)?$`)
    re.regex($e.principal.process.parent_process.file.full_path, `(?i)node(\.exe)?$`)
    (
      re.regex($e.principal.process.command_line, `(?i)(--test|--experimental-test-isolation|--require|--import|node:test|execArgv|--eval)`)
    )
  condition:
    $e
}
critical severity medium confidence

Chronicle YARA-L 2.0 rule detecting node-on-node process launches with vm2 node:test escape command-line indicators.

Data Sources

Windows SysmonLinux auditdEDR process telemetry

Required Tables

UDM

False Positives & Tuning

  • CI/CD node --test execution.
  • Developer local test runner usage.
  • Loader-based node re-spawns using --require/--import.

Other platforms for CVE-2026-92948


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Install vulnerable vm2 version

    Expected signal: npm install process creation and filesystem writes under /tmp/vm2-cve-test/node_modules/vm2; version string 3.11.6 printed.

  2. Test 2 Simulate node:test execArgv child spawn

    Expected signal: Process-creation events showing node spawning a child node process with --test / --experimental-test-isolation / execArgv / --eval on the command line.

  3. Test 3 Windows node:test execArgv simulation

    Expected signal: Sysmon Event ID 1 showing node.exe parent spawning node.exe child with --test / --experimental-test-isolation / execArgv flags.


Response Playbook

Triage

  1. Confirm whether the affected host runs a Node.js application that depends on vm2. Run `npm ls vm2` / `grep -r "vm2" package-lock.json yarn.lock pnpm-lock.yaml` across deployed app directories and check whether the resolved version falls within >= 3.9.6 and <= 3.11.6.
  2. Review the flagged process tree: confirm the parent node process is the sandbox host and the child node process was launched with execArgv-style flags (--test, --require, --import, --eval, node:test). Capture the full command line and the user context.
  3. Determine whether the vm2 sandbox in this application evaluates untrusted/attacker-supplied code (e.g. user-submitted scripts, plugin systems, templating). If it only runs trusted first-party code, exploitability is sharply lower.
  4. Correlate the event timestamp with inbound requests to the application (web/API logs) to identify whether a specific request payload triggered the sandbox evaluation.

Containment

  1. Upgrade vm2 to 3.11.7 or later; where feasible, migrate off vm2 entirely (it is deprecated) to `isolated-vm` or a separate hardened runtime, since vm2 has a long history of escapes.
  2. If immediate patching is not possible, isolate or take the exposed application offline, or disable the code-evaluation feature that feeds untrusted input into the vm2 NodeVM sandbox.
  3. Block/kill the offending child node process and quarantine the host if post-exploitation activity (new persistence, outbound C2, credential access) is observed.

Evidence Collection

  1. Preserve full process-creation telemetry for the parent and child node processes, including complete command lines, environment, and working directory.
  2. Capture the application's request logs and any stored untrusted script/payload that was passed into the vm2 sandbox around the event time.
  3. Snapshot the host filesystem artifacts: node_modules/vm2 version, package-lock, and any files written by the escaped process; collect memory image if active compromise is suspected.

Escalation Criteria

  • !Escalate to IR immediately if the child node process shows post-escape behavior: spawning shells, writing to startup/persistence locations, outbound network connections to unknown hosts, or credential/secret access.
  • !Escalate if the vulnerable vm2 sandbox is confirmed to evaluate attacker-controllable input on an internet-facing service.
  • !Escalate if evidence shows the event correlates with an external request payload matching known PoC patterns (GHSA-qhwx-74w5-xhxq).

Investigation Guide

Forensic Artifacts

  • >node_modules/vm2 package version (package.json/package-lock.json) within the affected version range.
  • >Process-creation records showing node spawning node with --test/--require/--import/execArgv flags.
  • >Application request logs containing the untrusted script payload passed to NodeVM.
  • >Files written or modified by the escaped child process outside the application's normal working set.

Tuning Guidance

Baseline legitimate use of the native Node.js test runner in your environment (CI agents, developer workstations, build hosts) and exclude those hosts/service accounts to cut noise. The native `--test` flag alone is extremely common and benign; prioritize alerts where the parent node process corresponds to a known vm2-embedding application rather than a test harness, and where the child spawn originates from a production service account. Where possible, enrich with the `npm ls vm2` inventory so alerts fire preferentially on hosts with a vulnerable vm2 version installed.


Hunting Queries

Hunt for node-on-node process chains carrying the distinctive node:test / execArgv indicators of the vm2 escape, broadened beyond the primary rule's flag set.

Hunting — KQL
kql
// df00tech DF00-b907b994e8 · https://df00tech.com/detections/CVE-2026-92948 · licence: https://df00tech.com/detections/licence
DeviceProcessEvents | where InitiatingProcessFileName in~ ("node.exe","node") and FileName in~ ("node.exe","node") and ProcessCommandLine has_any ("node:test","execArgv","--experimental-test-isolation") | project Timestamp, DeviceName, InitiatingProcessCommandLine, ProcessCommandLine
Hunting — SPL
spl
``` df00tech DF00-b907b994e8 · https://df00tech.com/detections/CVE-2026-92948 · licence: https://df00tech.com/detections/licence ```
index=* (process_name=node OR process_name=node.exe) parent_process_name=node* | search process="*node:test*" OR process="*execArgv*" OR process="*--experimental-test-isolation*" | stats count by host, user, process

Atomic Red Team Tests

Test 1 Install vulnerable vm2 version
linux

Install a vm2 version within the affected range to validate inventory-based detection and software composition scanning.

Command

bash
mkdir -p /tmp/vm2-cve-test && cd /tmp/vm2-cve-test && npm init -y >/dev/null 2>&1 && npm install [email protected] >/dev/null 2>&1 && node -e "console.log(require('vm2/package.json').version)"

Cleanup

bash
rm -rf /tmp/vm2-cve-test

Expected Telemetry

npm install process creation and filesystem writes under /tmp/vm2-cve-test/node_modules/vm2; version string 3.11.6 printed.

Expected Detection

Software inventory / SCA detects [email protected] within the vulnerable range >= 3.9.6, <= 3.11.6.

Test 2 Simulate node:test execArgv child spawn
linux

Launch a node process that invokes the native test runner with custom execArgv, producing the node-on-node process-creation telemetry the rules key on (benign simulation of the escape's observable behavior).

Command

bash
cd /tmp && node -e "const {run}=require('node:test'); run({files:[], execArgv:['--eval','process.stdout.write(\"escaped\")']}).on('test:stderr',()=>{});" ; node --test --experimental-test-isolation=process -e "1" 2>/dev/null || true

Cleanup

bash
echo 'no cleanup required'

Expected Telemetry

Process-creation events showing node spawning a child node process with --test / --experimental-test-isolation / execArgv / --eval on the command line.

Expected Detection

Rule matches node parent spawning node child with execArgv/node:test/--test indicators.

Test 3 Windows node:test execArgv simulation
windows

Windows equivalent that spawns a child node process via the native test runner with execArgv to generate detectable process telemetry.

Command

powershell
node.exe -e "const {run}=require('node:test'); try{run({files:[],execArgv:['--eval','process.stdout.write(String(1))']});}catch(e){}" & node.exe --test --experimental-test-isolation=process

Cleanup

powershell
echo no cleanup required

Expected Telemetry

Sysmon Event ID 1 showing node.exe parent spawning node.exe child with --test / --experimental-test-isolation / execArgv flags.

Expected Detection

KQL/Sysmon rule matches node.exe-on-node.exe creation with execArgv/test-runner indicators.

Related Detections