Skip to content
Heist/ feed
Critical

vm2 before 3.12.2 Authorization Bypass via Custom Resolver

Type: advisorySource: Official CVE List1 source record

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.

Announced Group revision 1
Original source ↗

CVE-2026-100721

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-100721

vm2

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "vendor": "patriksimek",
    "product": "vm2",
    "versions": [
      {
        "status": "affected",
        "version": "0",
        "lessThan": "3.12.2",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "3.12.2",
        "versionType": "semver"
      }
    ],
    "packageURL": "pkg:npm/vm2",
    "defaultStatus": "unaffected"
  }
]
Related CVEs
CVE-2026-100721

Source reference: /cveMetadata/cveId

Publisher severity

critical

Source reference: /containers/cna/metrics

Event
#3225 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement