Live threats

All CVEs / patriksimek

CVE-2026-92935patriksimek vm2

Remote code execution in vm2 via array-shaped require configuration

Critical 9.5 No auth needed

Priority
72
CVSS 4.0
9.5
EPSS
—
Auth required
No
Published
Sep 17, 2026
Updated
Sep 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-913
SSVC (CISA)
Exploitation: none · Automatable: no · Technical impact: total
Vector
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

vm2 versions 3.11.4 to 3.11.6 contain a validation flaw in the `require` configuration of NodeVM that allows an attacker to bypass the sandbox. If NodeVM is configured with `nesting: true` and `require: []` (an array), the attacker can require the host `vm2` module, create an inner NodeVM with access to native modules like `child_process`, and execute arbitrary commands with the privileges of the Node.js process.

Show the original NVD text

vm2 is a sandbox for running untrusted Node.js code. In versions >= 3.11.4 and <= 3.11.6, the NodeVM constructor computes `hasRealRequireConfig` with `typeof requireOpts === 'object' && requireOpts !== null`, so an array-shaped `require` value (for example `require: []`) satisfies the guard that is meant to reject nesting without an explicit require configuration. `makeResolverFromLegacyOptions()` then destructures the array into undefined option fields and returns a resolver containing only `NESTING_OVERRIDE.vm2`. As a result, an attacker who can supply JavaScript executed by a NodeVM configured with truthy `nesting` and an array-shaped `require` (e.g. `new NodeVM({nesting: true, require: []})`) can require the host `vm2` module, create an inner NodeVM with an attacker-chosen builtin allowlist (such as `child_process`), and execute arbitrary commands with the privileges of the host Node.js process, escaping the sandbox. Outer builtin restrictions do not constrain the attacker-created inner NodeVM. This issue is fixed in vm2 3.11.7.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 3.11.7

Update vm2 to version 3.11.7 or later to apply the configuration validation fix.

Vendor advisory · github.com ↗

  1. Apply the vendor's security update for vm2.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm vm2 ≥ 3.11.4 < 3.11.7 3.11.7 npm install vm2@3.11.7

Per OSV / GitHub Advisories (GHSA-8hr7-r645-pc6w). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.