Intel

AIKIDO-2026-750176

vm2 is vulnerable to Sandbox Escape

Sandbox EscapeGHSA-j89j-5m6r-cr2q Published 5 days ago

100

Critical Risk

This Affects:

JSvm2
3.9.6 - 3.12.0
Fixed in 3.12.1
Are you affected? Scan for Free

TL;DR

vm2 exposes host functions to guest code through a bridge. When a non-strict host function is called with a nullish receiver (bareword, detached, or via call/apply/bind with no receiver), V8 binds this to the host realm global and the bridge passes that object into the sandbox. Guest code then uses the real host global to run commands through process.getBuiltinModule('child_process'), escaping the sandbox. The fix stores the host global at bridge initialization and returns undefined instead of passing it at the host to sandbox coercion points, while keeping strict function semantics.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your embedding code exposes a non-strict (sloppy mode) host function to the sandbox.

Background info

vm2 is vulnerable to Sandbox Escape in versions 3.9.6 - 3.12.0.

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