Patriksimek vm2
vm2: bufferAllocLimit cap bypassed by Buffer.concat and Buffer.from arrayLike
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.6, the bufferAllocLimit enforcement in lib/setup-sandbox.js does not cover Buffer.concat(list, totalLength) or Buffer.from(arrayLike) with an attacker-controlled length, allowing sandbox code to perform large synchronous host external-memory allocations that bypass the configured cap and can exhaust the host process. This issue is fixed in version 3.11.6.
First public PoC
None yetno public PoC found
Public PoCs00 on GitHub
CVSS8.7high · scored by CNA · CWE-770
CISA KEV
Not listednot known exploited
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
patriksimek vm2
- < 3.11.6
Fixed in 3.11.6
Mitigation
Upgrade vm2 to 3.11.6 or later.
References
- Vendor advisory github.com/patriksimek/vm2/security/advisories…
- Patch github.com/patriksimek/vm2/commit/3ffb315512e6…
- Release notes github.com/patriksimek/vm2/releases/tag/3.11.6
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.