Skip to content
Heist/ feed
CriticalFix available

vm2 allows a sandboxed plugin to execute native code through `node:sqlite`

Type: advisorySource: OSV1 source record

### Summary vm2 3.11.6 exposes Node.js's host `node:sqlite` module to `NodeVM` code when that builtin is allowed explicitly or through `builtin: ['*']`. The module is wrapped as read-only, but callable methods retain host-process authority. A sandboxed plugin can construct an in-memory database with extension loading enabled and call `DatabaseSync.loadExtension()` on a native library bundled in the plugin directory. SQLite loads the library into the Node.js host process and invokes its native extension entry point. This gives the untrusted plugin arbitrary native code execution outside the sandbox. The exploit needs only the `node:sqlite` builtin and a compatible native library already present in the untrusted plugin package. It does not require `fs`, `process`, `module`, `child_process`, `worker_threads`, `vm`, `inspector`, vm2 nesting, or an existing database file. ### Details The vulnerable boundary spans the builtin inventory, resolver, runtime loader, and generic read-only wrapper. On current Node.js versions, the builtin inventory contains the literal name `node:sqlite`. vm2 admits that name when it is explicitly configured or when the wildcard allowlist is expanded: ```js const BUILTIN_MODULES = module.builtinModules.filter(/* denylist checks */); ``` The resolver then treats every request beginning with `node:` as a core-module request, even if the complete request string is not an allowlist key: ```js if (x.startsWith('node:') || this.builtins.has(x)) { return x; } `

Announced Source revision 1
Original source ↗

GHSA-6w8r-xxw2-g3hx

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: osv:GHSA-6w8r-xxw2-g3hx

vm2

Source reference: /affected/0/package/name

Affected versions
Not stated in this record
Fixed versions
3.11.7

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": "3.11.3"
          },
          {
            "fixed": "3.11.7"
          }
        ]
      }
    ],
    "package": {
      "name": "vm2",
      "purl": "pkg:npm/vm2",
      "ecosystem": "npm"
    },
    "database_specific": {
      "source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-6w8r-xxw2-g3hx/GHSA-6w8r-xxw2-g3hx.json",
      "last_known_affected_version_range": "<= 3.11.6"
    }
  }
]
Related CVEs
CVE-2026-92938

Source reference: /aliases

Publisher severity

critical

Source reference: /database_specific/severity

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