vm2: NodeVM `builtin: ['*']` exposes `os` and `dns` — process-wide observability reads AND writes that hijack the host
Affects vm2Source GCVE Database
CVSS 10.0 Critical : upgrade to 3.11.6 as a priority.
Data as of 5 Nov 2026, 23:19 UTC
- Patch
- Available – fixed in 3.11.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:LWhat to do
Upgrade vm2 to 3.11.6.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmvm2 | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available that adds 'os' and 'dns' to the dangerous builtins list in vm2, preventing their exposure when using the builtin: ['*'] configuration. Users should upgrade to vm2 version 3.11.6 or later. Alternatively, manual exclusion of 'os' and 'dns' from the builtin allowlist is recommended if upgrading is not immediately possible. This mitigates the risk by preventing sandboxed code from accessing these modules and performing process-wide state reads or writes.
Description
The vm2 NodeVM module with configuration builtin: ['*'] exposes the 'os' and 'dns' built-in modules, allowing sandboxed code to read sensitive host process information and perform process-wide state modifications. This includes reading host user info, network interfaces, and hostname, as well as hijacking DNS resolution via dns.setServers(). The vulnerability affects vm2 versions prior to 3.11.6 and has a critical CVSS score of 10. A patch is available to mitigate this issue by adding 'os' and 'dns' to the dangerous builtins list, preventing their exposure under the wildcard configuration.