SocWatch

CVE-2026-100721

Kritisch 9,0 PoC auf GitHub

vm2: NodeVM custom resolution bypasses external path boundaries

CVSS
9,0 (v3.1)
Angriffswahrscheinlichkeit (EPSS)
0,59 % (höher als 49,6 % aller Lücken)
Veröffentlicht
27.09.2026
Zuletzt geändert
28.09.2026

Öffentlicher Angriffscode

Ein Proof of Concept auf GitHub, darunter murrez/CVE-2026-100721. Ungeprüft: solche Repositories enthalten manchmal selbst Schadcode.

Beschreibung

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.

Betroffene Pakete

Paket Betroffen Behoben in
npm vm2 alle Versionen vor 3.12.2 3.12.2

Quellen

Weitere Kennungen

GHSA-5h3f-q97h-ccvc · CWE-863

Sind Ihre Projekte betroffen?

Prüfen Sie ein Lockfile kostenlos oder lassen Sie Ihre Repositories laufend überwachen.