Critical severity · published Sep 27, 2026
CVE-2026-100721
vm2 before 3.12.2 Authorization Bypass via Custom Resolver
9.0
CVSS
0.6%
EPSS
No
On KEV
Description
vm2 before 3.12.2 contains an authorization bypass in the NodeVM external-module resolver. When an embedder configures `require.external` with a custom resolver (and `context: 'host'`), `LegacyResolver.customResolve` in lib/resolver-compat.js records the resolved module directory in `this.externals` as `new RegExp('^' + escapeRegExp(resolvedPath))`, without requiring a path separator or end-of-string boundary. Untrusted guest code can therefore require the allowlisted module (e.g. `foo`) and then require the absolute path of a non-allowlisted sibling whose path merely shares the resolved prefix (e.g. `.../node_modules/foo2/index.js`); the sibling passes `isPathAllowedForModule` and is loaded through `hostRequire`, so its top-level code runs in the host process before the exports are wrapped with `vm.readonly`, resulting in a sandbox escape and arbitrary code execution in the host context.
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Attack vector
Network
Complexity
High
Privileges
None
User interaction
None
Confidentiality
High
Integrity
High
Availability
High
Scope
Changed
Exploitation
Is it being used?
Exploit prediction (EPSS)0.6% · higher than 48% of CVEs
Exploited in the wildNo evidence yet
CISA KEVNot listed
Ransomware campaign useNot known
Affected products
Which versions
VM
vm2 · patriksimek
before 3.12.2 · source: vendor
References
NVD
https://nvd.nist.gov/vuln/detail/CVE-2026-100721
CVE.org
https://www.cve.org/CVERecord?id=CVE-2026-100721
vendor-advisory
https://github.com/patriksimek/vm2/security/advisories/GHSA-5h3f-q97h-ccvc
patch
https://github.com/patriksimek/vm2/commit/6ac3916da84e060c403e407b6b6318fcc66b0e72
patch
https://github.com/patriksimek/vm2/commit/ab4ee7d803e8c80155e9eb3672226bddbca4aa9c
patch
https://github.com/patriksimek/vm2/commit/91034466bfb7f56b95fd48083ec6ca36d058f164
third-party-advisory
https://www.vulncheck.com/advisories/vm2-before-3.12.2-authorization-bypass-via-custom-resolver
More from vm2
10.0
CVE-2026-93606
vm2 before 3.12.1 Sandbox Escape via Promise Symbol.species
10.0
CVE-2026-93605
vm2 NodeVM before 3.12.1 Remote Code Execution via child_process
10.0
CVE-2026-93603
vm2 before 3.12.1 Sandbox Escape RCE via Non-Strict Host Function
10.0
CVE-2026-92960
vm2 before 3.11.6 Process-wide State Exposure via os and dns
10.0
CVE-2026-92956
vm2 3.10.1 through 3.11.6 Sandbox Escape via WebAssembly.compileStreaming
