Junglewise Threat Intelligence

CVE-2026-92934: vm2 sandbox escape in AggregateError handling

CVE-2026-92934 · Severity: critical · CVSS 9 · Published 2026-09-17

Technologies: Vm2.

Executive brief

vm2 is a JavaScript sandbox designed to safely isolate untrusted code execution from the host system. A flaw in how it sanitizes exception objects allows attackers to break out of the sandbox and execute arbitrary commands on the host machine with full privileges. The vulnerability occurs when catching specific types of exceptions, enabling an attacker to access the host's file system, environment variables, and run arbitrary processes.

Technical details

The vulnerability is an incomplete fix bypass affecting Error.cause sanitization in the handleException function (lib/setup-sandbox.js). When an AggregateError object containing host references is revisited within a single exception handler traversal (through self-cycles, mutual-cycles, or duplicate references in the errors array), the cycle detection short-circuit at line 1819 returns the raw unsanitized host proxy instead of the memoized sandbox-realm replacement. This occurs because sanitizeAggregateError rebuilds host-wrapped carriers into fresh LocalAggregateError objects without sealing the original, allowing the live proxy to be re-embedded in the sanitized errors array. Attack requires embedder to expose a host function that throws such a crafted AggregateError; sandbox code catches it and accesses the leak via e.errors[index].property chains, achieving full RCE via child_process.execSync and process information disclosure. Fixed in vm2 3.11.8.

Affected products

  • vm2 vm2 before 3.11.8

Timeline

  • 2026-08-27: disclosed: GHSA-x965-fc75-jpqh published
  • 2026-09-17: advisory: CVE-2026-92934 published on NVD
  • 2026: patched: Fix released in vm2 3.11.8

References