{"id":"CVE-2026-100721","state":"PUBLISHED","title":"vm2 before 3.12.2 Authorization Bypass via Custom Resolver","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.","publishedAt":"2026-09-27T01:28:28.596Z","updatedAt":"2026-09-28T16:51:10.611Z","severity":{"score":9.5,"label":"Critical","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","source":"VulnCheck"},"assigner":"VulnCheck","products":["patriksimek vm2"],"affected":[{"vendor":"patriksimek","product":"vm2","packageURL":"pkg:npm/vm2","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.12.2","versionType":"semver"},{"version":"3.12.2","status":"unaffected","versionType":"semver"}]}],"references":["https://github.com/patriksimek/vm2/security/advisories/GHSA-5h3f-q97h-ccvc","https://github.com/patriksimek/vm2/commit/6ac3916da84e060c403e407b6b6318fcc66b0e72","https://github.com/patriksimek/vm2/commit/ab4ee7d803e8c80155e9eb3672226bddbca4aa9c","https://github.com/patriksimek/vm2/commit/91034466bfb7f56b95fd48083ec6ca36d058f164","https://www.vulncheck.com/advisories/vm2-before-3.12.2-authorization-bypass-via-custom-resolver"],"weaknesses":["CWE-863"],"ingestedAt":"2026-10-29T20:10:13.529Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/100xxx/CVE-2026-100721.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-100721","state":"PUBLISHED","datePublished":"2026-09-27T01:28:28.596Z","dateUpdated":"2026-09-28T16:51:10.611Z","assignerShortName":"VulnCheck","assignerOrgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateReserved":"2026-09-26T02:40:56.226Z"},"containers":{"cna":{"title":"vm2 before 3.12.2 Authorization Bypass via Custom Resolver","descriptions":[{"lang":"en","value":"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."}],"affected":[{"vendor":"patriksimek","product":"vm2","packageURL":"pkg:npm/vm2","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"3.12.2","versionType":"semver"},{"version":"3.12.2","status":"unaffected","versionType":"semver"}]}],"references":[{"url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-5h3f-q97h-ccvc","tags":["vendor-advisory"],"name":"GitHub Security Advisory (GHSA-5h3f-q97h-ccvc)"},{"url":"https://github.com/patriksimek/vm2/commit/6ac3916da84e060c403e407b6b6318fcc66b0e72","tags":["patch"],"name":"Patch Commit"},{"url":"https://github.com/patriksimek/vm2/commit/ab4ee7d803e8c80155e9eb3672226bddbca4aa9c","tags":["patch"],"name":"Patch Commit"},{"url":"https://github.com/patriksimek/vm2/commit/91034466bfb7f56b95fd48083ec6ca36d058f164","tags":["patch"],"name":"Patch Commit"},{"url":"https://www.vulncheck.com/advisories/vm2-before-3.12.2-authorization-bypass-via-custom-resolver","name":"VulnCheck Advisory: vm2 before 3.12.2 Authorization Bypass via Custom Resolver","tags":["third-party-advisory"]}],"metrics":[{"format":"CVSS","cvssV4_0":{"version":"4.0","vectorString":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H","attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"PRESENT","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"HIGH","vulnIntegrityImpact":"HIGH","vulnAvailabilityImpact":"HIGH","subConfidentialityImpact":"HIGH","subIntegrityImpact":"HIGH","subAvailabilityImpact":"HIGH","baseScore":9.5,"baseSeverity":"CRITICAL"}},{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"HIGH","privilegesRequired":"NONE","userInteraction":"NONE","scope":"CHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":9,"baseSeverity":"CRITICAL"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-863","lang":"en","description":"Incorrect Authorization","type":"CWE"}]}],"providerMetadata":{"shortName":"VulnCheck","orgId":"83251b91-4cc7-4094-a5c7-464a1b83ea10","dateUpdated":"2026-09-27T01:28:28.596Z"},"datePublic":"2026-09-08T00:00:00.000Z","credits":[{"lang":"en","value":"rexpository","type":"reporter"}],"x_generator":{"engine":"vulncheck-endgame"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-09-28T16:50:50.404410Z","id":"CVE-2026-100721","options":[{"Exploitation":"poc"},{"Automatable":"no"},{"Technical Impact":"total"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-09-28T16:51:10.611Z"}}]}}}