Improper Control of Dynamically-Managed Code Resources in vm2 - CVE-2026-92946
Published: August 25, 2026 / Updated: September 18, 2026
Vulnerability details
The vulnerability allows a remote attacker to execute arbitrary code.
The vulnerability exists due to improper control of dynamically-managed code resources in the NodeVM require.external handling and resolver logic when loading local files or npm packages without an explicit require.root that excludes node_modules. A remote attacker can require the installed vm2 package, obtain unrestricted NodeVM or VM classes, and execute arbitrary code.
The issue arises because require.root defaults to unrestricted access and require.context defaults to host, causing loaded files to run through the real Node.js require() outside the sandbox.