CVE-2026-100721: vm2: NodeVM custom resolution bypasses external path boundaries
At source revision 91034466bfb7f56b95fd48083ec6ca36d058f164 of vm2 3.11.8, an untrusted NodeVM guest can turn one allowlisted custom-resolved module into authorization for a separate file whose path merely shares the resolved path’s string prefix. LegacyResolver.customResolve stores the resolved path in this.externals as ^<path> without an end or separator boundary; a later absolute require of a sibling such as foo2/index.js therefore passes the external check and is loaded through hostRequire when the configured context is host. The decisive attack loaded foo as FOO_OK and then executed the prefix-sharing sibling, which returned PREFIX_PWN after invoking child_process; an otherwise identical control denied the sibling with ENOTFOUND.
References
- github.com/advisories/GHSA-5h3f-q97h-ccvc
- github.com/patriksimek/vm2/commit/6ac3916da84e060c403e407b6b6318fcc66b0e72
- github.com/patriksimek/vm2/commit/91034466bfb7f56b95fd48083ec6ca36d058f164
- github.com/patriksimek/vm2/commit/ab4ee7d803e8c80155e9eb3672226bddbca4aa9c
- github.com/patriksimek/vm2/commit/fb4977f6211da6cadffdf1f3a2017a826a21c51f
- github.com/patriksimek/vm2/releases/tag/v3.12.2
- github.com/patriksimek/vm2/security/advisories/GHSA-5h3f-q97h-ccvc
- nvd.nist.gov/vuln/detail/CVE-2026-100721
- www.vulncheck.com/advisories/vm2-before-3.12.2-authorization-bypass-via-custom-resolver
Code Behaviors & Features
Detect and mitigate CVE-2026-100721 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →