Executive brief
vm2 is a popular tool used to safely run untrusted code in a restricted 'sandbox' environment. A critical flaw allows an attacker to bypass these security restrictions and gain full control over the underlying server. This could lead to the theft of sensitive data, service disruption, or the installation of malicious software on the host system.
Technical details
A vulnerability in vm2's NodeVM allows for a sandbox escape when the 'module' builtin is permitted, which often occurs by default when using the '*' wildcard in the builtin allowlist. The 'module' builtin exposes Node's internal 'Module._load()' method to the sandboxed environment. Because vm2 wraps this builtin in a generic readonly proxy that does not intercept function calls, an attacker can call 'Module._load()' to load restricted modules like 'child_process' directly in the host context. This bypasses all vm2 security restrictions and enables arbitrary command execution. The issue is fixed in version 3.11.0 by properly excluding dangerous builtins from the default expansion.
Affected products
- patriksimek vm2 < 3.11.0
- Red Hat Self-service automation portal 2 2
- Red Hat Red Hat Developer Hub 1
Timeline
- 2026-05-01: advisory: GitHub advisory published by maintainer
- 2026-05-13: disclosed: CVE-2026-43999 assigned and published to NVD
- 2026-05-13: patched: Vulnerability fixed in version 3.11.0