vm2 NodeVM TLS trust store manipulation

Severity: critical · CVSS 10 · Published 2026-09-17

vm2 is a JavaScript sandbox that isolates untrusted code. A vulnerability in versions 3.11.3–3.11.6 allows sandboxed code with access to the tls module to replace the host process's trusted certificate authorities, enabling attackers to intercept HTTPS traffic and steal credentials. This affects any application using vm2 that runs untrusted code.

Technologies: vm2 (npm), Patriksimek Vm2. Vendors: npm, Patriksimek.

Quick answers

Is This vulnerability exploited in the wild?
No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.
How severe is This vulnerability?
Critical severity, with a CVSS score of 10, published 17 September 2026.
Which products and versions are affected?
vm2 (npm) >= 3.11.3, <= 3.11.6; Patriksimek Vm2 3.11.3 to 3.11.6.
Is there a fix for This vulnerability?
A patch was published on 2026-08-24: Version 3.11.7 patches the vulnerability Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is This vulnerability attacked?
It is attacked over the network.
Am I affected?
Check whether you run vm2 (npm) or Patriksimek Vm2 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

Technical details

The vulnerability exists in the builtin loader (lib/builtin.js), which exposes the tls module through a read-only bridge that does not sandbox function calls. Attacker code can call tls.setDefaultCACertificates() with a host-realm array obtained via URLSearchParams.getAll() from the url module, allowing replacement of the process-wide CA list without requiring fs, process, or other dangerous builtins. This enables MITM attacks on subsequent host HTTPS connections that do not specify their own CA certificate option.

Affected products

  • patriksimek vm2 3.11.3 to 3.11.6

Timeline

  • 2026-08-24: disclosed
  • 2026-08-24: patched: Version 3.11.7 patches the vulnerability
  • 2026-09-17: advisory

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.