Intel

AIKIDO-2026-217467

vm2 is vulnerable to Sandbox Escape

Sandbox EscapeGHSA-27g9-p43v-cw3v Published Aug 26, 2026

85

High Risk

This Affects:

JSvm2
3.10.2 - 3.11.6
Fixed in 3.11.7
Are you affected? Scan for Free

TL;DR

vm2 wraps Promise.prototype.then and related methods to sanitize values crossing the sandbox boundary, but a V8 optimization merges consecutive prototype assignments without invalidating an internal protector. As a result Promise.prototype.finally() follows a fast path that trusts the stale protector and skips sanitization. Sandboxed code uses a fulfilled promise with a controlled species and a calibrated stack overflow to obtain a host-realm error, reach the host Function constructor, and execute code with host privileges. The fix invalidates the protector correctly and wraps Promise.prototype.finally.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you run untrusted code on Node.js 26.

Background info

vm2 is vulnerable to Sandbox Escape in versions 3.10.2 - 3.11.6.

How to fix this

Upgrade the vm2 library to the patch version.

Are You Affected?

Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.

Free. No credit card required.

Aikido Platform