Description
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.6, handleException() in lib/setup-sandbox.js sanitizes SuppressedError.error, SuppressedError.suppressed, and AggregateError.errors but does not sanitize Error.cause, allowing sandbox code to obtain a powerful host object such as process from an embedder-exposed host function that throws an error with that object as its cause and then execute arbitrary host commands. This issue is fixed in version 3.11.6.
Published: 2026-08-17
Score: 9.9 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability is a failure to sanitize the Error.cause property during exception handling in the vm2 sandbox. This oversight allows sandboxed code to capture a powerful host object such as process when the host exposes a function that throws an error whose cause is that object, and then execute arbitrary host commands. The flaw constitutes a privilege‑escalation from the sandbox to the host, effectively enabling remote code execution on the underlying system. The weakness is a classic example of improper configuration or omission of defensive coding (CWE‑693).

Affected Systems

The affected product is patriksimek’s vm2, a JavaScript virtual machine crafted for Node.js. All releases prior to version 3.11.6 are vulnerable. Version 3.11.6 and later contain the fix. The library is used in many Node.js projects that require trusted isolation of untrusted code.

Risk and Exploitability

The advisory assigns a CVSS score of 9.9, indicating critical severity, and the EPSS score is not available. Since the vulnerability is listed as not in KEV, no widespread, authenticated exploitation is currently documented. Based on the description, the likely attack vector involves the host supplying an error‑throwing function with a host object as its cause, allowing the sandbox to recover that object and run commands. The requirement for a host‑side configuration means attackers must have some influence over the host code or the ability to supply such functions, but once present the exploitation is straightforward.

Generated by OpenCVE AI on August 18, 2026 at 00:01 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade vm2 to version 3.11.6 or newer to apply the security fix.
  • If an upgrade is not immediately possible, remove or redesign any host-exposed functions that throw errors with host objects as their cause to prevent the sandbox from accessing them.
  • As a temporary containment measure, limit the sandboxed code’s access to host resources or run the sandbox with minimal privileges so that even if it escapes, it cannot execute system commands.

Generated by OpenCVE AI on August 18, 2026 at 00:01 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-m283-3h24-438v VM2 has Missing Error.cause Sanitization that Enables Sandbox Escape to RCE
History

Mon, 17 Aug 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Patriksimek
Patriksimek vm2
Vendors & Products Patriksimek
Patriksimek vm2

Mon, 17 Aug 2026 21:15:00 +0000

Type Values Removed Values Added
Description vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.6, handleException() in lib/setup-sandbox.js sanitizes SuppressedError.error, SuppressedError.suppressed, and AggregateError.errors but does not sanitize Error.cause, allowing sandbox code to obtain a powerful host object such as process from an embedder-exposed host function that throws an error with that object as its cause and then execute arbitrary host commands. This issue is fixed in version 3.11.6.
Title vm2: Missing Error.cause Sanitization Enables VM2 Sandbox Escape to RCE
Weaknesses CWE-693
References
Metrics cvssV3_1

{'score': 9.9, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-17T20:54:39.406Z

Reserved: 2026-05-19T21:18:20.403Z

Link: CVE-2026-47686

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-17T21:16:45.507

Modified: 2026-08-17T21:16:45.507

Link: CVE-2026-47686

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-18T00:15:03Z

Weaknesses
  • CWE-693

    Protection Mechanism Failure