CVE-2026-100721
published critical CVSS 4.0 · 9.5vm2 before 3.12.2 Authorization Bypass via Custom Resolver
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| patriksimek | — | vm20 to < 3.12.2 (affected · semver) · 3.12.2 (unaffected · semver) · Other versions: unaffected | Version-specific | Not stated | VulnCheck |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 9.5 / 10
- Severity
- critical
- Provider
- VulnCheck · cna
- Vector string
- 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
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 9.0 | critical | VulnCheck · cna | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| patriksimek | vm2 | 0 to < 3.12.2 (affected · semver)3.12.2 (unaffected · semver)Default: unaffected | VulnCheck · cna |
Weaknesses
1- CWE-863 Incorrect Authorization
References
5- Patch Commit https://github.com/patriksimek/vm2/commit/6ac3916da84e060c403e407b6b6318fcc66b0e72
- Patch Commit https://github.com/patriksimek/vm2/commit/91034466bfb7f56b95fd48083ec6ca36d058f164
- Patch Commit https://github.com/patriksimek/vm2/commit/ab4ee7d803e8c80155e9eb3672226bddbca4aa9c
- GitHub Security Advisory (GHSA-5h3f-q97h-ccvc) https://github.com/patriksimek/vm2/security/advisories/GHSA-5h3f-q97h-ccvc
- VulnCheck Advisory: vm2 before 3.12.2 Authorization Bypass via Custom Resolver https://www.vulncheck.com/advisories/vm2-before-3.12.2-authorization-bypass-via-custom-resolver
Provider assertions
2VulnCheck · cna
vm2 before 3.12.2 Authorization Bypass via Custom Resolver
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 5a76b2533fa34abecea46b10fc07ee2c35abb7d8d49d92438e4f4a3cc0c4eb99
- Ingested
- 30 Sep 2026, 15:17:34 UTC
- Source record
- Official CVE record