Live threats
VulnFox

All CVEs / patriksimek

CVE-2026-100721patriksimek vm2

Authorization bypass in vm2 external module resolver

Critical 9.5 No auth needed

Priority
72
CVSS 4.0
9.5
EPSS
—
Auth required
No
Published
Sep 27, 2026
Updated
Sep 28, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-863
SSVC (CISA)
Exploitation: proof of concept · Automatable: no · Technical impact: total
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X

What happens

vm2 before 3.12.2 contains an authorization bypass in the NodeVM external-module resolver. An attacker can load non-allowlisted modules by exploiting incomplete path validation, enabling arbitrary code execution in the host context without authentication.

AI-generated summary (Claude) based on NVD and CISA data. Not reviewed yet: check the details in the vendor advisory.

Show the original NVD 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.

Source text, unmodified. NVD.

What to do

Patch available · fixed versions: 3.12.2

Update vm2 to version 3.12.2 or later.

Vendor advisory · github.com ↗

AI-generated from public data; not reviewed.

  1. Apply the vendor's security update for vm2.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm vm2 < 3.12.2 3.12.2 npm install vm2@3.12.2

Per OSV / GitHub Advisories (GHSA-5h3f-q97h-ccvc). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.