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.
Problem types
CWE-913: Improper Control of Dynamically-Managed Code Resources
Product status
References
github.com/...ek/vm2/security/advisories/GHSA-m4wx-m65x-ghrr
github.com/...ommit/01a7552add345d5a6862623884e6b79a85bf0568
github.com/...ommit/86ab819f202c3a8dad88cef5705f2e416c5188d7
github.com/advisories/GHSA-g644-9gfx-q4q4
github.com/patriksimek/vm2/releases/tag/v3.11.4