External risk intelligence

vm2 Sandbox Escape Via Unsanitized Error Cause

CVE advisorySeverity: CRITICAL (CVSS 9.9)

CVE-2026-47686

vm2 is a sandboxing library intended for internal use within Node.js applications to isolate untrusted code execution. It is a developer-focused utility library embedded within software rather than an internet-facing service, appliance, or gateway, making direct public internet reachability of the library itself inherently unlikely.

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This advisory concerns a vulnerability in the vm2 Node.js sandboxing library, which allows specially crafted code to escape its isolated environment and execute commands on the host system. This could enable unauthorized access and control over the underlying server. The main concern is confirming relevance and exposure within your Node.js applications.

  • Sandbox escape allows remote command execution.
  • Matters if Node.js sandboxing is used.
  • Confirm relevance and potential exposure.

Attack Path

How an attacker could exploit the issue

An attacker with limited access could potentially exploit this vulnerability by triggering an error within a sandboxed environment. If the sandbox code can then obtain a powerful host object, like the Node.js `process` object, through an error's cause, it could lead to the execution of arbitrary commands on the host system.

  • Requires authenticated access.
  • Triggered by specific error handling.
  • Allows arbitrary host command execution.

Live Threat

Current exploitation, exposure, and threat context

When a Node.js application uses vm2 with a configured host function, an attacker could craft code within the sandbox to trigger an error. If this error includes a powerful host object, such as `process`, as its cause, the sandbox's sanitization mechanisms could be bypassed, potentially allowing arbitrary command execution on the host system.

  • Host object exposure.
  • Exploiting error handling in sandboxed code.
  • Arbitrary host command execution.

Operational Fix

Recommended remediation, mitigation, and detection steps

Teams responsible for Node.js applications embedding the vm2 library, such as application owners and platform teams, should prioritize identifying instances of the affected component. The first practical step is to locate all deployments, assess their exposure and business criticality, and then identify the accountable owner to plan remediation.

  • Identify accountable application owners.
  • Verify vm2 library usage and reachability.
  • Plan risk-based remediation and vendor coordination.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is the vm2 library used for?

vm2 is an open-source library for Node.js environments designed to run untrusted code securely. Developers use it to create sandboxes—isolated containers—that prevent code running inside them from interacting with the main host system or accessing sensitive local resources.

How does CVE-2026-47686 work?

This vulnerability is classified as CWE-693, Protection Mechanism Failure. It occurs because the sandbox's error handling fails to sanitize the 'cause' property of an error. If a sandbox-exposed function throws an error containing a powerful host object, the sandbox fails to hide it, allowing the contained code to escape and access the host system.

Do I need to trigger an error to exploit this?

Yes. The vulnerability specifically requires the execution of sandboxed code that triggers an error containing a host object, like 'process'. Simple code execution within the sandbox that does not involve these specific error-handling conditions will not trigger this escape mechanism.

Is my application at risk from the internet?

According to Halo Surface Signal, direct internet reachability is very unlikely. Because vm2 is an internal utility library embedded within applications, it is typically not an internet-facing service itself. Risk depends on whether your application accepts and executes untrusted user input within these sandboxes.

What should I do if I use vm2?

Your first step is to identify all applications in your environment that utilize the vm2 library. Once you have a clear inventory, prioritize updates for these applications. The vulnerability is resolved in version 3.11.6, so updating to this version or higher is the recommended path for remediation.

References