Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. vm2
  4. ›
  5. GHSA-m5w8-4gq2-6f8x

GHSA-m5w8-4gq2-6f8x: vm2: NodeVM `builtin: ['*']` exposes `os` and `dns` — process-wide observability reads AND writes that hijack the host (sibling class of GHSA-9g8x-92q2-p28f)

August 17, 2026

GHSA-9g8x-92q2-p28f closed the “process-wide observability builtins” class by adding diagnostics_channel, async_hooks, perf_hooks, and v8 to DANGEROUS_BUILTINS in lib/builtin.js. The fix’s rationale (in the commit message and docs/ATTACKS.md Category 35) is general:

Process-wide observability builtins. Unlike most Node builtins, these expose state of the entire host process rather than sandbox-local state — the vm2 boundary cannot usefully contain them because the data they surface […] belongs to the embedder. Even a readonly proxy that forwards every call to the host module is a working host-data exfiltration primitive.

Two builtins satisfying the same description were not added: os and dns. Both are reachable today under the documented builtin: ['*'] configuration; both expose host-process state that the vm.readonly() proxy cannot localise; and both have write APIs that mutate global host-process state from the sandbox (os.setPriority(), dns.setServers(), dns.setDefaultResultOrder()). dns.setServers() in particular turns sandbox code into a process-wide DNS hijack primitive — strictly worse than every read-only leak that GHSA-9g8x added.

Adding os and dns to DANGEROUS_BUILTINS extends the same fix to the rest of the class. The existing isDangerousBuiltin(key) family-prefix matcher (added by GHSA-rp36-8xq3-r6c4) automatically catches node:os, node:dns, and node:dns/promises once the family names are present.

References

  • github.com/advisories/GHSA-m5w8-4gq2-6f8x
  • github.com/patriksimek/vm2/releases/tag/3.11.6
  • github.com/patriksimek/vm2/security/advisories/GHSA-m5w8-4gq2-6f8x

Code Behaviors & Features

Detect and mitigate GHSA-m5w8-4gq2-6f8x with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.11.6

Fixed versions

  • 3.11.6

Solution

Upgrade to version 3.11.6 or above.

Impact 10 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L

Learn more about CVSS

Weakness

  • CWE-200: Exposure of Sensitive Information to an Unauthorized Actor
  • CWE-285: Improper Authorization
  • CWE-732: Incorrect Permission Assignment for Critical Resource

Source file

npm/vm2/GHSA-m5w8-4gq2-6f8x.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 18 Aug 2026 00:16:38 +0000.