/

CVE-2026-100723

Severity:

HIGH RISK

(7.5)

Sandbox Memory Disclosure (CWE-200) in vm2 zlib Buffers

CVE-2026-100723

Deferred

Vulnerability type

Category:

Sandbox Boundary Violation

CWE:

CWE-200

Impact:

Cross-Sandbox Memory Disclosure and Corruption

Severity:

HIGH RISK

(7.5)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A boundary-validation flaw in vm2 can expose bytes from Node.js shared buffer memory to untrusted sandbox code when the zlib builtin is explicitly allowed. Guest code may read or modify data belonging to unrelated host buffers, creating cross-boundary information disclosure and memory corruption risks.

Affected context

The issue occurs in vm2 deployments that expose Node.js built-in modules through the NodeVM require allowlist and permit untrusted code to use zlib compression functions. It becomes risky when a returned Buffer retains a backing ArrayBuffer representing shared pool storage and the sandbox boundary does not enforce the expected ownership and length invariants.

Exploit preconditions

  • Attack surface: The NodeVM sandbox and explicitly exposed Node.js built-in modules
  • Required access: Ability to execute untrusted guest code within the affected vm2 instance
  • Trigger point: Processing a zlib result returned as a Buffer across the sandbox boundary
  • Why exploitation is possible: The returned Buffer may reference a shared backing store, while vm2 fails to ensure that the exposed ArrayBuffer is limited to the Buffer's owned bytes

Why this happens

The underlying bug is insufficient validation of Buffer backing-store ownership when values cross the vm2 sandbox boundary. A Buffer returned by a host builtin can reference a shared small-buffer pool whose ArrayBuffer is larger than the logical Buffer. If the boundary accepts that object without enforcing ownership, offset, and length invariants, guest code can obtain access to unrelated bytes. This maps to CWE-200 because data outside the intended disclosure scope becomes observable across a security boundary; the same flaw can also permit unintended modification of host-realm memory.

Potential impact

  • Guest code may disclose sensitive data held in unrelated host buffers
  • Guest code could corrupt host or neighboring buffer contents
  • Application integrity may be degraded through tampered in-memory data
  • Confidentiality and isolation guarantees of the sandbox may be weakened
  • Downstream application behavior could be altered or destabilized

General mitigation guidance

Mitigation generally focuses on preserving strict ownership boundaries for all

host objects exposed to sandboxed code.

Common defensive patterns include:

  • Applying explicit backing-store ownership, offset, and length checks before exposing Buffers
  • Copying data into independently owned buffers rather than sharing pooled storage
  • Limiting builtin-module exposure to narrowly required, reviewed interfaces
  • Returning immutable or normalized data representations across the sandbox boundary where practical
  • Running sandboxed workloads with least privilege and separate process or container isolation when stronger boundaries are required
  • Treating all guest-accessible host-module results as untrusted boundary objects

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that identify host objects crossing sandbox boundaries without ownership checks
  • Code review signals involving Buffer, ArrayBuffer, shared pools, byte offsets, and unrestricted backing-store exposure
  • Tests that verify returned views cannot observe bytes outside their logical range
  • Policy checks requiring explicit allowlists and wrapper interfaces for host builtin modules
  • Runtime monitoring for unexpected access to sensitive data or mutation of shared application buffers

Automated security review tools may help identify unsafe object-boundary patterns, but boundary-focused tests should validate the isolation guarantee directly.

Sources

SourceLink
github.comgithub.com/patriksimek/vm2/commit/4f2508abeb252aa86eb6761c78b3b000248fb089
github.comgithub.com/patriksimek/vm2/commit/5214b02ef13b82497fcb917b45320dfd014ffd09
github.comgithub.com/patriksimek/vm2/security/advisories/GHSA-489w-w794-jq94
vulncheck.comvulncheck.com/advisories/vm2-before-3.12.2-memory-disclosure-via-zlib-buffer-pool

Frequently asked

questions

It is generally not a direct network exploit. Exploitation requires execution of

untrusted code inside an affected vm2 NodeVM and access to the relevant exposed

builtin functionality.

An attacker needs a way to run guest code in the sandbox. The zlib builtin must

also be explicitly exposed through the NodeVM configuration or an equivalent

application wrapper.

Enforce strict ownership and range invariants for Buffers crossing the boundary,

and prefer copying data into independently owned representations before exposing it

to guest code.

Minimize builtin allowlists, wrap host APIs with narrow data contracts, test

cross-boundary objects for aliasing and out-of-range visibility, and use stronger

process or container isolation when untrusted code requires access to complex host APIs.

Find out what's already
exploitable in your codebase.