Critical remote code execution in vm2, a widely used Node.js sandbox library
Blog post from GitLab
GitLab’s Threat Research Group identified a CVSS 10.0 sandbox escape in vm2 versions 3.11.6 and earlier, a widely used Node.js isolation library, affecting configurations modeled on its own README example with `require.external: true` and `require.root: './'`. The flaw allowed untrusted code to load vm2’s real installed package through the host’s module loader, create a new NodeVM with attacker-controlled permissions, and execute host commands through modules such as `child_process`. vm2 version 3.11.7 blocks this specific technique, but GitLab warns that broader risks remain when `require.external` is enabled with overly broad root paths or the default `context: 'host'`, since accessible files may expose powerful Node.js capabilities. Users are advised to upgrade, restrict allowed roots to minimal dedicated directories, explicitly use `context: 'sandbox'`, and avoid relying on vm2 for truly untrusted code where containers or separate processes offer stronger isolation. The report also notes vm2’s history of recurring sandbox escapes, its widespread use in plugin platforms, CI systems, and AI code-execution tools, and the need to assess whether security patches address underlying configuration patterns rather than only a reported exploit path.
No tracked trend matches for this post yet.
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.