# vm2 NodeVM zlib buffer pool information disclosure

Source: https://junglewise.ai/threats/duplicate-advisory-vm2-nodevm-zlib-buffers-expose-pooled-host-memory-6007c734  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-27. Updated: 2026-10-05  
License: CC BY 4.0 with a link back

Severity: high · CVSS 7.5 · Published 2026-09-27

vm2 is a sandbox that runs untrusted JavaScript code in isolation. When the zlib compression module is explicitly exposed through vm2's configuration, guest code can access the underlying memory pool backing small compressed buffers and read or modify sensitive host data outside the intended buffer boundaries, exposing or corrupting host memory.

Technologies: [vm2 (npm)](https://junglewise.ai/threats/technologies/vm2), [Vm2](https://junglewise.ai/threats/technologies/x-vm2). Vendors: [npm](https://junglewise.ai/threats/vendors/npm).

## Quick answers

**Is This vulnerability exploited in the wild?** No. Junglewise Threat Intelligence has no report of This vulnerability being exploited in the wild.

**How severe is This vulnerability?** High severity, with a CVSS score of 7.5, published 27 September 2026.

**Which products and versions are affected?** vm2 (npm) < 3.12.2; Vm2 before 3.12.2.

**Is there a fix for This vulnerability?** Yes: fixed in 3.12.2. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is This vulnerability attacked?** It is attacked over the network, in a software library.

**Am I affected?** Check whether you run vm2 (npm) or Vm2 at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- Fixed in 3.12.2

## Technical details

The vulnerability stems from vm2's failure to enforce its buffer backing-store ownership invariant (byteOffset === 0 and buffer.byteLength === length) on Buffers returned from host builtin modules. When zlib.deflateSync returns a small buffer from Node's shared pool, guest code can construct a full-width view of the pool's entire ArrayBuffer via Buffer.from(result.buffer, 0, result.buffer.byteLength), bypassing isolation. The attack requires explicit allowlisting of zlib in NodeVM's require configuration.

## Affected products

- vm2 before 3.12.2

## Timeline

- 2026-09-08: disclosed
- 2026-09-27: patched

## References

- [https://github.com/patriksimek/vm2/security/advisories/GHSA-489w-w794-jq94](https://github.com/patriksimek/vm2/security/advisories/GHSA-489w-w794-jq94)

## Related threats

- [vm2 NodeVM path bypass in custom resolution](https://junglewise.ai/threats/duplicate-advisory-vm2-nodevm-custom-resolution-bypasses-external-path-5d3a7272)
- [vm2 host Promise rejection denial of service in construct trap](https://junglewise.ai/threats/duplicate-advisory-vm2-host-promise-rejection-from-an-exposed-f7aba6ba)
- [vm2 sandbox escape via Buffer backing-store ownership bypass](https://junglewise.ai/threats/cve-2026-100723-vm2-before-3-12-2-does-not-apply-its-buffer-backing-store)
- [vm2 unhandled Promise rejection in construct trap](https://junglewise.ai/threats/cve-2026-100722-vm2-before-3-12-2-does-not-apply-host-side-promise-rejection)
- [vm2 authorization bypass in NodeVM external-module resolver](https://junglewise.ai/threats/cve-2026-100721-vm2-before-3-12-2-contains-an-authorization-bypass-in-the-nodevm)
