Skip to content
Heist/ feed
Unrated

Duplicate Advisory: vm2: NodeVM custom resolution bypasses external path boundaries

Type: withdrawalSource: OSV1 source record

## Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-5h3f-q97h-ccvc. This link is maintained to preserve external references. ## Original 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.

Announced Group revision 1
Original source ↗

GHSA-c9wr-qm7p-p6vc

Primary source · Revision 1 · Withdrawn

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

Security context

Source reference: osv:GHSA-c9wr-qm7p-p6vc

vm2

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
3.12.2

Source reference: /affected/0/ranges

Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "ranges": [
      {
        "type": "SEMVER",
        "events": [
          {
            "introduced": "0"
          },
          {
            "fixed": "3.12.2"
          }
        ]
      }
    ],
    "package": {
      "name": "vm2",
      "purl": "pkg:npm/vm2",
      "ecosystem": "npm"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/09/GHSA-c9wr-qm7p-p6vc/GHSA-c9wr-qm7p-p6vc.json"
    }
  }
]

Publisher severity

critical

Source reference: /database_specific/severity

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