vm2: NodeVM `builtin: ['*']` exposes `os` and `dns` — process-wide observability reads AND writes that hijack the host (sibling class of GHSA-9g8x-92q2-p28f)
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.
AI Analysis
Technical Summary
The vm2 NodeVM module's builtin: ['*'] configuration expands to include the 'os' and 'dns' Node.js built-in modules, which expose host process state that cannot be contained by the vm2 sandbox boundary. The 'os' module exposes sensitive host information such as user identity and network topology, while the 'dns' module includes write APIs like dns.setServers() that allow sandboxed code to hijack the host's DNS resolution process. This leads to a critical vulnerability with high confidentiality and integrity impact, as sandboxed code can both read sensitive host data and perform process-wide DNS hijacking without requiring privileges. The issue is related to but distinct from a previously fixed class of process-wide observability builtins. The fix involves adding 'os' and 'dns' to the dangerous builtins set, preventing their inclusion when using the '*' wildcard in builtin allowlists.
Potential Impact
An attacker controlling sandboxed code in vm2 with builtin: ['*'] can read sensitive host process information including user identity, network interfaces, and host telemetry, violating confidentiality. They can also perform process-wide DNS hijacking by calling dns.setServers(), affecting all DNS lookups made by the host process and potentially redirecting network traffic. This compromises both confidentiality and integrity of the host environment. No privileges are required for exploitation as the attacker controls the sandbox code, making the impact critical.
Mitigation Recommendations
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.
vm2: NodeVM `builtin: ['*']` exposes `os` and `dns` — process-wide observability reads AND writes that hijack the host (sibling class of GHSA-9g8x-92q2-p28f)
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.
CVSS v3.1
Score 10.0critical
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vm2 NodeVM module's builtin: ['*'] configuration expands to include the 'os' and 'dns' Node.js built-in modules, which expose host process state that cannot be contained by the vm2 sandbox boundary. The 'os' module exposes sensitive host information such as user identity and network topology, while the 'dns' module includes write APIs like dns.setServers() that allow sandboxed code to hijack the host's DNS resolution process. This leads to a critical vulnerability with high confidentiality and integrity impact, as sandboxed code can both read sensitive host data and perform process-wide DNS hijacking without requiring privileges. The issue is related to but distinct from a previously fixed class of process-wide observability builtins. The fix involves adding 'os' and 'dns' to the dangerous builtins set, preventing their inclusion when using the '*' wildcard in builtin allowlists.
Potential Impact
An attacker controlling sandboxed code in vm2 with builtin: ['*'] can read sensitive host process information including user identity, network interfaces, and host telemetry, violating confidentiality. They can also perform process-wide DNS hijacking by calling dns.setServers(), affecting all DNS lookups made by the host process and potentially redirecting network traffic. This compromises both confidentiality and integrity of the host environment. No privileges are required for exploitation as the attacker controls the sandbox code, making the impact critical.
Mitigation Recommendations
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.
Technical Details
- Gcve Source
- db.gcve.eu
- Osv Id
- GHSA-m5w8-4gq2-6f8x
- Osv Schema Version
- 1.4.0
- Aliases
- []
- Ecosystems
- ["npm"]
- Database Specific Severity
- CRITICAL
- Cvss Version
- 3.1
Threat ID: 6a838cd9bf8831d539b5ef8a
Added to database: 08/17/2026, 22:36:09 UTC
Last enriched: 08/17/2026, 22:41:12 UTC
Last updated: 08/18/2026, 01:55:28 UTC
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.