Impact
vm2’s NodeVM implementation enforces a require.root limit to confine module loading, but the check uses path.resolve() which does not dereference symlinks. A malicious user can therefore create a symlink that points outside the intended root, tricking the Node.js require system into loading host modules. This bypass leads to remote code execution and is formally classified under CWE-59, Path Traversal.
Affected Systems
The vulnerability applies to the open‑source sandbox library vm2 from patriksimek. Versions up to and including 3.10.5 are affected. The fix is bundled in release 3.11.0 and later.
Risk and Exploitability
The CVSS score of 8.5 indicates a high risk, and while the EPSS score is not available, the lack of a KEV listing does not diminish the threat. An attacker executing code inside the sandbox can exploit the symlink bypass to load arbitrary modules from the host environment, effectively achieving remote code execution. The attack requires access to the sandbox’s require.api; no network component is involved, so it is a local privilege escalation within the context of the running process.
OpenCVE Enrichment
Github GHSA