vm2 has Memory Exhaustion DoS via bufferAllocLimit Bypass
Affects vm2Source GCVE Database
CVSS 7.5 High : upgrade to 3.11.6 soon.
Data as of 17 Aug 2026, 22:41 UTC
- Patch
- Available – fixed in 3.11.6
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HWhat to do
Upgrade vm2 to 3.11.6.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| npmvm2 | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
A patch is available for vm2 that addresses this vulnerability. Operators should upgrade to vm2 version 3.11.6 or later to ensure the bufferAllocLimit defense properly covers all memory allocation paths including ArrayBuffer and TypedArray constructors. Until patched, relying solely on bufferAllocLimit does not prevent memory exhaustion via these bypass methods.
Description
The vm2 sandbox module has a vulnerability in its buffer allocation limit defense that can be bypassed using ArrayBuffer, SharedArrayBuffer, or TypedArray constructors. These constructors allocate host memory through the same underlying C++ path as Buffer.alloc but are not subject to the bufferAllocLimit cap. This allows an attacker to exhaust host memory synchronously, causing a denial of service by out-of-memory kills in constrained environments such as Docker, Kubernetes, or AWS Lambda. The vulnerability affects vm2 versions prior to 3.11.6 and all Node.js versions. A patch is available.