Improper Control of Dynamically-Managed Code Resources in vm2 - #VU131741
Published: May 18, 2026
vm2
Detailed vulnerability description
The vulnerability allows a remote attacker to execute arbitrary code.
The vulnerability exists due to improper control of dynamically-managed code resources in the vm2 sandbox when processing crafted code inside the sandbox. A remote attacker can combine Buffer prototype accessors with Node.js error handling to escape the sandbox and execute arbitrary code.
The issue allows access to the host's TypeError constructor, resulting in a scope change from the sandbox to the host environment.