CVE-2026-47137
Deferred Deferred - Pending Action
Prototype Pollution in vm2 Sandbox via Missing Require Option

Publication date: 2026-06-12

Last updated on: 2026-06-12

Assigner: GitHub, Inc.

Description
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, the fix for GHSA-8hg8-63c5-gwmx (CVE-2023-37903) introduced a check in nodevm.js line 263 that blocks the combination nesting: true + require: false. However, the check uses strict equality (options.require === false), which is trivially bypassed by omitting the require option entirely. When require is not specified, options.require is undefined, not false. The strict equality check fails, so the security guard is skipped. Immediately after (line 280), the destructuring default require: requireOpts = false assigns requireOpts = false, producing the exact configuration the patch was designed to prevent. This issue has been patched in version 3.11.4.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-06-12
Last Modified
2026-06-12
Generated
2026-06-12
AI Q&A
2026-06-12
EPSS Evaluated
N/A
NVD
EUVD
Affected Vendors & Products
Showing 3 associated CPEs
Vendor Product Version / Range
patriksimek vm2 3.11.4
patriksimek vm2 to 3.11.4 (exc)
patriksimek vm2 to 3.9.20 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-913 The product does not properly restrict reading from or writing to dynamically-managed code resources such as variables, objects, classes, attributes, functions, or executable instructions or statements.
Attack-Flow Graph
AI Quick Actions
Instant insights powered by AI
Compliance Impact

The provided information does not explicitly address how CVE-2026-47137 affects compliance with common standards and regulations such as GDPR or HIPAA.

Executive Summary

CVE-2026-47137 is a critical security vulnerability in the vm2 library, an open source sandbox for Node.js. The issue arises from an incomplete patch that was intended to block a dangerous configuration combining nesting: true with require: false in the NodeVM class.

The original fix checked if the require option was strictly equal to false, but this check could be bypassed by omitting the require option entirely, which results in require being undefined rather than false. Due to this, the security check was skipped, and a default assignment later in the code set requireOpts to false anyway, effectively allowing the insecure configuration the patch was meant to prevent.

This bypass enables an attacker to create a nested NodeVM with an attacker-controlled require configuration, allowing them to load modules like child_process and execute arbitrary code on the host system.

The vulnerability was fixed by restructuring the code to properly check for all falsy or omitted require values and reject insecure configurations at construction time, restoring the intended security guard.

Impact Analysis

This vulnerability allows an attacker to bypass sandbox restrictions in vm2 and achieve remote code execution (RCE) on the host system without any privileges or user interaction.

By exploiting the bypass, an attacker can create a nested NodeVM instance with a manipulated require configuration, enabling them to load sensitive modules such as child_process and execute arbitrary operating system commands.

The impact is severe, granting the attacker full control over the host system, potentially leading to data theft, system compromise, or further attacks.

The vulnerability has a CVSS score of 10.0 (Critical), indicating maximum severity with low attack complexity, no privileges required, and no user interaction needed.

Detection Guidance

This vulnerability involves a bypass in the vm2 library's NodeVM configuration, specifically when using the combination of nesting: true and require option omitted or falsy. Detection involves inspecting the usage of vm2 in your Node.js applications to identify if vulnerable versions (<= 3.11.3) are in use and if NodeVM instances are created with nesting enabled and require omitted or set to falsy values.

Since the vulnerability is in the code logic of vm2, direct network detection commands are not straightforward. Instead, you can check your installed vm2 package version and audit your code for unsafe NodeVM configurations.

  • Check vm2 version installed: npm list vm2
  • Search your codebase for NodeVM instantiations with nesting: true and missing or falsy require option, e.g., using grep or similar tools:
  • grep -r "new NodeVM" ./
  • Then manually verify if any instantiation uses nesting: true without explicitly setting require to a safe object.

There are no specific network commands or signatures provided in the resources to detect exploitation attempts, as the vulnerability is exploited via crafted NodeVM configurations leading to remote code execution.

Mitigation Strategies

The primary mitigation step is to upgrade the vm2 library to version 3.11.4 or later, where this vulnerability has been patched.

If upgrading immediately is not possible, avoid using the combination of nesting: true with require omitted or set to falsy values in NodeVM configurations, as this combination leads to the vulnerability.

  • Upgrade vm2 to version 3.11.4 or later.
  • Audit and modify your code to ensure that when nesting: true is used, the require option is explicitly set to a safe, non-falsy object.
  • Consider disabling the nesting option if it is not required.

These steps prevent the creation of vulnerable NodeVM instances that could be exploited for remote code execution.

Chat Assistant
Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-47137. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70
EPSS Chart