Prototype pollution in vm2 - #VU146043
Published: August 28, 2026
Vulnerability details
The vulnerability allows a remote attacker to modify host typed-array and ArrayBuffer prototype behavior, causing integrity and availability impacts.
The vulnerability exists due to improperly controlled modification of object prototype attributes in host Uint8Array.prototype, %TypedArray%.prototype, and ArrayBuffer.prototype when running untrusted JavaScript in a default vm2 VM. A remote attacker can execute sandboxed code that reaches and mutates host prototypes to modify host typed-array and ArrayBuffer prototype behavior, causing integrity and availability impacts.
The issue crosses the sandbox boundary and affects ordinary host-created typed arrays and ArrayBuffers after VM.run() returns.