{"id":"CVE-2026-92935","published":"2026-09-17T13:46:00Z","modified":"2026-09-17T19:21:04Z","title":"vm2 NodeVM Remote Code Execution via Array-Shaped Require","vendor":"patriksimek","product":"vm2","tier":"tail","description":{"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00673,"percentile":0.47134,"provenance":"source"},"cwes":[{"id":"CWE-913","name":"Improper Control of Dynamically-Managed Code Resources"}],"references":[{"url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-8hr7-r645-pc6w","tags":["vendor-advisory"]},{"url":"https://github.com/patriksimek/vm2/commit/54b54b74a382577f0bcd0538c5bf99acdcd7f53b","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/vm2-nodevm-remote-code-execution-via-array-shaped-require","tags":["third-party-advisory"]}],"priority":{"score":20.7,"factors":[{"name":"EPSS percentile","points":9.43},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.3}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-10-23","earliestUrl":"https://github.com/CompleteTech-Security/vm2-nesting-check","repos":[{"name":"CompleteTech-Security/vm2-nesting-check","url":"https://github.com/CompleteTech-Security/vm2-nesting-check","stars":0,"created":"2026-10-23"}]},"first":{"date":"2026-10-23","source":"PoC-in-GitHub","url":"https://github.com/CompleteTech-Security/vm2-nesting-check"},"provenance":"source"},"vendorSlug":"patriksimek","affectedVersions":[{"vendor":"patriksimek","product":"vm2","versions":[">= 3.11.4, < 3.11.7"]}],"fixedVersions":[{"vendor":"patriksimek","product":"vm2","versions":["3.11.7"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-09-17T18:57:25.525605Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"vm2","vulnerableRanges":[">=3.11.4, <3.11.7"],"patched":["3.11.7"],"from":["GHSA-8hr7-r645-pc6w"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-81585","exploited":false,"provenance":"source"}}