Impact
The vulnerability arises in vm2 prior to version 3.12.2 when the Buffer backing‑store ownership invariant is not enforced for Buffers returned from host built‑in modules. When an application permits Node's zlib module through the NodeVM allowlist, zlib.deflateSync can return a Buffer that is a slice of Node's shared small‑buffer pool. Untrusted guest code can then create a full‑width view of that underlying ArrayBuffer, enabling it to read and modify bytes that belong to unrelated host buffers. This exposes host‑realm memory across the sandbox boundary and can lead to memory disclosure and corruption. The weakness is classified as CWE‑200.
Affected Systems
Affected systems are Node.js applications that use the patriksimek vm2 package earlier than 3.12.2. The vulnerability is present in any environment where the application configures the NodeVM allowlist to include zlib, allowing guest code to invoke zlib.deflateSync and generate the vulnerable Buffer. No specific OS or OS version is required; the issue is in the JavaScript library itself.
Risk and Exploitability
The CVSS score of 6.9 indicates a medium severity. The EPSS score is not available, and the vulnerability has not been listed in the CISA KEV catalog, suggesting that widespread exploitation may not yet be observed. The attack requires an application that deliberately exposes zlib to guest code and for the guest to invoke deflateSync. While the vector is limited to those specific scenarios, the ability to read and corrupt the host memory poses a substantial risk, especially if sensitive data or critical application state resides in the affected buffers.
OpenCVE Enrichment