{"id":"CVE-2026-100721","published":"2026-09-27T01:28:28Z","modified":"2026-09-28T16:51:10Z","title":"vm2 before 3.12.2 Authorization Bypass via Custom Resolver","vendor":"patriksimek","product":"vm2","tier":"tail","description":{"text":"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.","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.00591,"percentile":0.49181,"provenance":"source"},"cwes":[{"id":"CWE-863","name":"Incorrect Authorization"}],"references":[{"url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-5h3f-q97h-ccvc","tags":["vendor-advisory"]},{"url":"https://github.com/patriksimek/vm2/commit/6ac3916da84e060c403e407b6b6318fcc66b0e72","tags":["patch"]},{"url":"https://github.com/patriksimek/vm2/commit/ab4ee7d803e8c80155e9eb3672226bddbca4aa9c","tags":["patch"]},{"url":"https://github.com/patriksimek/vm2/commit/91034466bfb7f56b95fd48083ec6ca36d058f164","tags":["patch"]},{"url":"https://www.vulncheck.com/advisories/vm2-before-3.12.2-authorization-bypass-via-custom-resolver","tags":["third-party-advisory"]}],"priority":{"score":21.1,"factors":[{"name":"EPSS percentile","points":9.84},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.3}]},"exploitSources":{"pocGithub":{"count":1,"skipped":0,"earliest":"2026-09-28","earliestUrl":"https://github.com/murrez/CVE-2026-100721","repos":[{"name":"murrez/CVE-2026-100721","url":"https://github.com/murrez/CVE-2026-100721","stars":0,"created":"2026-09-28"}]},"first":{"date":"2026-09-28","source":"PoC-in-GitHub","url":"https://github.com/murrez/CVE-2026-100721"},"provenance":"source"},"vendorSlug":"patriksimek","affectedVersions":[{"vendor":"patriksimek","product":"vm2","versions":["< 3.12.2"]}],"affected":[{"ecosystem":"npm","package":"vm2","vulnerableRanges":["<3.12.2"],"patched":["3.12.2"],"from":["GHSA-5h3f-q97h-ccvc"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-87858","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-92955","published":"2026-09-17","fixed":"3.11.8","kev":false},{"cve":"CVE-2026-92959","published":"2026-09-17","fixed":"3.11.8","kev":false},{"cve":"CVE-2026-93605","published":"2026-09-18","fixed":"3.12.1","kev":false,"link":{"from":"CVE-2026-93605","to":"CVE-2026-100721","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vm2","fromFixed":"3.12.1","toFixed":"3.12.2","daysApart":9}]}},{"cve":"CVE-2026-100721","published":"2026-09-27","fixed":"3.12.2","kev":false},{"cve":"CVE-2026-100722","published":"2026-09-27","fixed":"3.12.2","kev":false},{"cve":"CVE-2026-100723","published":"2026-09-27","fixed":"3.12.2","kev":false}],"package":"npm:vm2"}}