CRITICAL🇵🇱 Wersja polska

CVE-2026-47137

CVSS 10.0v3.1pub. 2026-06-12

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.

🤖 AI Analysis
How it works

The patch introduced for CVE-2023-37903 added a check in the nodevm.js file (line 263) blocking the combination of 'nesting: true' and 'require: false' options. However, the check uses strict comparison (options.require === false), which does not detect the case when the 'require' option is not provided at all — in that case its value is 'undefined', not 'false', so the protective condition is not met. Directly after this check (line 280), destructuring with a default value 'require: requireOpts = false' assigns the value 'false' to the requireOpts variable, recreating precisely that configuration which the patch was supposed to protect against. As a result, an attacker, by omitting the 'require' option, can cause the sandbox to run in a configuration that should be blocked.

Impact

An attacker can escape from the isolated vm2 sandbox environment and execute arbitrary code in the context of the host Node.js process, gaining full control over server resources (confidentiality, integrity, and availability — all rated as HIGH in the CVSS vector with scope changed to Scope: Changed).

Mitigation & patch

The vm2 library should be updated to version 3.11.4 or newer, in which the bug has been fixed. Details are available in vendor references (GitHub release v3.11.4 and security advisory GHSA-m4wx-m65x-ghrr).

Who is affected

The vm2 library in versions before 3.11.4 (all versions in which the patch for GHSA-8hg8-63c5-gwmx / CVE-2023-37903 was applied, i.e., from the introduction of the faulty check until release 3.11.4).

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
🔵
CHECK WITH VENDOR
No clear patch data available. Check vendor references.
CWE
References