Skip to main content

vm2 CVE-2026-100723

| EUVDEUVD-2026-87856 MEDIUM
Information Exposure (CWE-200)
6.9
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Submit untrusted script to vm2 sandbox
  2. Delivery
    Allocate pooled Buffer, read .buffer getter
  3. Exploit
    Obtain entire 64KiB host pool ArrayBuffer
  4. Execution
    Build full-width view over pool
  5. Impact
    Read and overwrite neighboring host secrets

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK

2 techniques across 2 tactics: Collection, Discovery

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the embedding application to explicitly expose Node's zlib module to the sandbox via NodeVM's builtin allowlist (require: { builtin: ['zlib'] }) - this is a NON-DEFAULT configuration; a stock vm2 sandbox without zlib exposure is not affected via this vector. It also requires the application to run attacker-controlled/untrusted guest JavaScript in vm2 (vm2's intended use), and for host secrets to be co-resident in Node's shared 64 KiB small-buffer pool at exploitation time. Limiting factors: the vulnerable product must be a pre-3.12.2 vm2 instance, zlib must be allowlisted, and success against specific host secrets depends on pool residency timing. No user interaction beyond running the untrusted script is needed.

Impact

The vendor CVSS 4.0 base score is 6.9 (Medium), and the vector is internally telling: it scores the vulnerable system as VC:N/VI:N/VA:N but the subsequent (host) system as SC:H/SI:L - correctly modeling this as a sandbox-to-host escape where the damage lands on the host realm, not the sandbox. AT:P (Attack Requirements: Present) captures the essential non-default gate: exploitation only becomes possible when the embedding application explicitly adds Node's zlib to the NodeVM builtin allowlist (require: { builtin: ['zlib'] }), which is NOT a default configuration. PR:N is accurate in the sense that guest script code is inherently untrusted and unauthenticated within the sandbox threat model - that is vm2's entire purpose. There is NO EPSS score and NO CISA KEV listing in the provided data, so there is no signal of active or widespread exploitation; the reporter is VulnCheck and the advisory (GHSA-489w-w794-jq94 / the code references GHSA-fcqc-726x-5wfc) contains proof-grade mechanics and canonical exploit snippets, so publicly available exploit code effectively exists. This is a real defense-in-depth failure with confirmed patch and clear technical PoC, but real-world priority is tempered by three factors: (1) the non-default zlib exposure requirement, (2) vm2 being officially deprecated (maintainers recommend migration away from it), and (3) no exploitation-in-the-wild signal. Note the CWE tagging: the advisory explicitly cites CWE-200 (disclosure) PLUS CWE-787 (out-of-bounds write / corruption), so labeling this purely 'Information Disclosure' understates the integrity impact - the sandbox can both read AND overwrite neighboring host buffers (secrets, tokens, DB rows).

Exploit ScenarioDerived

An application uses vm2 (< 3.12.2) to run untrusted third-party or user-submitted JavaScript and has explicitly exposed Node's zlib module to the sandbox via require: { builtin: ['zlib'] }. Because zlib.deflateSync returns a Buffer backed by Node's shared 64 KiB small-buffer pool, the guest reads result.buffer to obtain the entire pool ArrayBuffer, builds a full-width Buffer.from(pool, 0, 65536) view, and reads/overwrites host secrets (session tokens, DB rows, decrypted material) that happen to share the pool. Canonical exploit code exists in the vendor advisory (VulnCheck / GHSA), including the diagnostic Buffer.from([0]).buffer.byteLength === 65536 leak proof.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Sep 27, 2026

Information disclosure and cross-boundary host memory corruption in vm2 before 3.12.2 let untrusted guest JavaScript read and modify bytes outside the sandbox whenever the embedding application explicitly allowlists Node's zlib builtin via require: { builtin: ['zlib'] }. vm2 fails to apply its Buffer backing-store ownership invariant (byteOffset = 0 && buffer.byteLength = length) to Buffers returned from host builtin modules, so zlib.deflateSync can hand back a pooled buffer whose .buffer getter exposes Node's entire 64 KiB shared small-buffer pool; a guest then builds a full-width view with Buffer.from(result.buffer, 0, result.buffer.byteLength) to disclose secrets (session tokens, decrypted material, DB rows) and corrupt unrelated host buffers sharing that pool. This is not reachable in a default vm2 deployment - it requires a non-default zlib allowlist, attacker-controlled script execution, and host secrets co-resident in the pool at exploitation time - and no public exploit code was identified at time of analysis; the vendor rates it CVSS 4.0 6.9 (Medium) with a vendor-released patch in 3.12.2.

RemediationAI

Upgrade to vm2 3.12.2 or later - vendor-released patch 3.12.2, delivered by commits 4f2508abeb252aa86eb6761c78b3b000248fb089 and 5214b02ef13b82497fcb917b45320dfd014ffd09, which enforce the backing-store ownership invariant (byteOffset = 0 && buffer.byteLength = length) for every pooling factory and copy pool-backed results into standalone non-pooled buffers while preserving the documented Buffer.from(arrayBuffer, byteOffset, length) sharing overload behind a spoof-proof brand test. If immediate upgrading is not possible, the most direct compensating control is to remove 'zlib' (and any other builtin whose methods return Buffers) from the NodeVM builtin allowlist so host-realm Buffers never cross into the sandbox; the trade-off is that in-sandbox compression/decompression stops working, so move deflate/inflate work to the host side and pass already-transformed data, and treat every allowlisted builtin as a potential buffer-leak path. Do not rely on bufferAllocLimit tuning or on generic memory limits - the upstream fix notes this issue is independent of bufferAllocLimit, so those settings neither trigger nor mitigate it. Where the untrusted workload cannot be constrained, isolate the vm2 process so host secrets are not co-resident in the same process heap and shared small-buffer pool, accepting the operational cost of process separation; also review whether legitimate host credentials or session material are created on the same tick as sandboxed execution, since exploitation depends on pool residency timing. Vendor advisory: https://github.com/patriksimek/vm2/security/advisories/GHSA-489w-w794-jq94.

Affected VersionsENISA

vm2 0 <3.12.2

Affected Packages

npm vm2 fix: 3.12.2

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

vm2 is a Node.js sandbox library that runs untrusted guest JavaScript inside a separate V8 realm and bridges host objects and builtins across a Proxy-based membrane. The root cause is CWE-200 (Information Exposure), with the upstream changelog additionally classifying it as CWE-787 (Out-of-bounds Write) because the same primitive is read/write, not read-only. Node.js serves small Buffer.from(...), Buffer.concat(...), Buffer.of(...), Buffer.copyBytesFrom(...) and Buffer.allocUnsafe(...) allocations out of one shared backing ArrayBuffer of Buffer.poolSize bytes (64 KiB on modern Node, 8 KiB on Node 8). A pooled buffer's .buffer getter (Uint8Array.prototype.buffer) returns that whole pool rather than the buffer's own slice, at a non-zero byteOffset and with a much larger byteLength. vm2's invariant normally requires that any Buffer crossing the sandbox boundary be a standalone, non-pooled backing store (byteOffset = 0 and buffer.byteLength = length); the fix notes this was applied to the ordinary pooling factories but not to Buffers produced by host builtin modules reachable through NodeVM's builtin allowlist. When an application opts in with require: { builtin: ['zlib'] }, zlib.deflateSync executes in the host realm and returns a pool-backed Buffer, and the legacy Buffer.from(arrayBuffer, byteOffset, length) sharing overload - legitimately preserved for real ArrayBuffers - becomes the vehicle for a full-width view. The .buffer getter is an ordinary getter on a bridge-proxied Uint8Array, so no capability check intercepts it; the exposed bytes are genuinely part of the sandbox's own ArrayBuffer while simultaneously belonging to every host buffer packed in the same pool. Affected CPE: cpe:2.3:a:patriksimek:vm2. The upstream fix is independent of the bufferAllocLimit DoS control, so tuning that limit does not mitigate this issue. The independent assessment vectors this as CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N - network-reachable but with high attack complexity, scope-changed, unauthenticated (PR:N), with high confidentiality and low integrity impact landing on the host system (SC:H/SI:L) rather than the sandbox itself.

Know when Vm2 gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (VulnCheck) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N
vuln.today AI 7.5 HIGH

Untrusted sandbox code (PR:N) escapes to the host realm (S:C) for read and write, but AC:H reflects the non-default zlib allowlist gate and pool-residency timing; C:H disclosure, I:L partial corruption, no availability impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:N
4.0 AV:N/AC:H/AT:P/PR:N/UI:N/VC:N/VI:N/VA:N/SC:H/SI:L/SA:N
Red Hat 7.5 HIGH

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
None
Subsequent system: Confidentiality
High
Subsequent system: Integrity
Low
Subsequent system: Availability
None

DescriptionCVE.org

vm2 before 3.12.2 does not apply its Buffer backing-store ownership invariant (byteOffset = 0 and buffer.byteLength = length) to Buffers returned from host builtin modules. When an application explicitly exposes Node's zlib module through NodeVM's builtin allowlist (require: { builtin: ['zlib'] }), zlib.deflateSync can return a Buffer backed by Node's shared small-buffer pool whose .buffer is the entire pool. Untrusted guest code can construct a full-width view of that ArrayBuffer (Buffer.from(result.buffer, 0, result.buffer.byteLength)) to read and modify bytes belonging to unrelated host buffers, disclosing and corrupting host-realm memory across the sandbox boundary.

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 4,327 npm packages depend on vm2 (1,159 direct, 3,200 indirect)

Ecosystem-wide dependent count for version 3.12.2.

Threat Intelligence Overview

EPSS Score
0.3%
Top 78% exploitable
Prevalence
Medium
deprecated but very large historical npm footprint as sandbox lib
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

34
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +34
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Related Vulnerabilities in vm2 Sandbox Escape and Authorization Bypass

View all 3

More in Vm2

View all
CVE-2023-37466 CRITICAL POC
10.0 Jul 14

vm2 is an advanced vm/sandbox for Node.js. Rated critical severity (CVSS 10.0), this vulnerability is remotely exploitab

CVE-2023-32314 CRITICAL POC
10.0 May 15

vm2 is a sandbox that can run untrusted code with Node's built-in modules. Rated critical severity (CVSS 10.0), this vul

CVE-2023-30547 CRITICAL POC
10.0 Apr 17

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.

CVE-2023-29199 CRITICAL POC
10.0 Apr 14

There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15,

CVE-2022-36067 CRITICAL POC
10.0 Sep 06

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 10.

CVE-2021-23449 CRITICAL POC
10.0 Oct 18

This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr

CVE-2026-26956 CRITICAL POC
9.8 May 04

Full sandbox escape with arbitrary code execution allows remote attackers to break out of vm2's Node.js sandbox environm

CVE-2026-24120 CRITICAL POC
9.8 May 04

Sandbox escape in vm2 for Node.js allows remote unauthenticated attackers to execute arbitrary commands on the host syst

CVE-2026-45411 CRITICAL POC
9.8 May 13

Sandbox escape in vm2 (patriksimek/vm2) versions prior to 3.11.3 enables remote code execution on the host Node.js proce

CVE-2026-22709 CRITICAL POC
9.8 Jan 26

Sandbox escape in vm2 Node.js sandbox before 3.10.2 via Promise.prototype.then/catch callback sanitization bypass. PoC a

CVE-2023-29017 CRITICAL POC
9.8 Apr 06

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Rated critical severity (CVSS 9.8

CVE-2022-25893 CRITICAL POC
9.8 Dec 21

The package vm2 before 3.9.10 are vulnerable to Arbitrary Code Execution due to the usage of prototype lookup for the We

Vendor StatusVendor

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy