Skip to main content

vm2 EUVDEUVD-2026-36449

| CVE-2026-47141 MEDIUM
Exposure of Resource to Wrong Sphere (CWE-668)
2026-05-29 https://github.com/patriksimek/vm2 GHSA-9g8x-92q2-p28f
6.9
CVSS 4.0 · Vendor: https://github.com/patriksimek/vm2
View

Attack ChainAIDerived

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

  1. Access
    Attacker submits crafted JavaScript to NodeVM sandbox
  2. Delivery
    Sandbox calls require('diagnostics_channel') via host-granted builtin
  3. Exploit
    Subscribe to http.server.request.start diagnostic channel
  4. Execution
    Concurrent host HTTP request arrives in same process event loop
  5. Persist
    Sandbox callback receives full IncomingMessage with Authorization and session headers
  6. Impact
    Credentials exfiltrated across vm2 sandbox boundary

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V8 - Authorization Resource sphere isolation
MITRE ATT&CK

1 technique across 1 tactic: Collection

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

Exploitation Conditions

Exploitation requires three concurrent conditions: (1) the host application must explicitly include at least one of diagnostics_channel, async_hooks, perf_hooks, or v8 in the NodeVM require.builtin allowlist - these are not permitted by default and must be intentionally granted; (2) the attacker must have the ability to execute arbitrary JavaScript within a NodeVM instance in the vulnerable process (a deliberate feature of applications running user-supplied code); and (3) the host process must be simultaneously handling sensitive data through the permitted channel - active HTTP requests with credential headers for diagnostics_channel exploitation, per-request identity data stored in AsyncLocalStorage for async_hooks exploitation, or sensitive labels in performance marks for perf_hooks exploitation. The default vm2 configuration without explicit builtin grants is not vulnerable. Authentication requirements cannot be assessed from CVSS data (no vector provided). Limiting factors are the non-default builtin permission requirement and the need for co-located sensitive data in the same Node.js process - deployments that isolate sandbox execution in separate processes or worker threads with no shared HTTP server are not affected.

Impact

No CVSS vector or score is provided for this CVE, precluding quantitative decomposition of attack vector, complexity, or privilege requirements - severity cannot be derived from CVSS data for this advisory. No EPSS score is available. This CVE is not in CISA KEV, indicating no confirmed widespread active exploitation at the time of analysis. However, a publicly available proof-of-concept exists (confirmed by GHSA-9g8x-92q2-p28f with a linked PoC file demonstrating live credential extraction), which meaningfully elevates real-world risk above the baseline for unconfirmed theoretical vulnerabilities. The exploitation condition - that the host must explicitly grant sandbox access to one of the affected builtins via require.builtin - limits the affected population to applications deliberately running untrusted JavaScript inside NodeVM with non-default builtin permissions. For those deployments (multi-tenant code execution platforms, serverless sandbox environments, or developer playgrounds), the real-world impact is high: cross-tenant credential theft is a realistic outcome. For deployments that do not permit these builtins or do not run untrusted code, risk is negligible. The information-disclosure-only impact (CWE-668) versus code-execution distinguishes this from higher-severity sandbox escapes, but token theft in a multi-tenant context can be operationally equivalent to full account compromise.

Exploit ScenarioDerived

An attacker operating a tenant account on a multi-tenant Node.js platform that evaluates user-submitted JavaScript inside NodeVM - with diagnostics_channel included in the builtin allowlist - submits code that calls require('diagnostics_channel').subscribe('http.server.request.start', (msg) => exfiltrate(msg.request.headers)). When any concurrent HTTP request arrives at the host server in the same process, the attacker's sandboxed callback receives the full IncomingMessage object, including Authorization: Bearer HOST_HTTP_SECRET and x-session-token headers belonging to other users or the host application. A public proof-of-concept confirming this exact extraction path is referenced in GHSA-9g8x-92q2-p28f.

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

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

Alert me

AnalysisAIv1 – May 29, 2026

Host process data leakage in vm2 (npm/vm2 <= 3.11.3) allows untrusted JavaScript executing inside a NodeVM sandbox to read sensitive host-process state - including HTTP Authorization headers, session tokens, and AsyncLocalStorage request context - by requiring process-wide observability builtins that were incorrectly absent from the DANGEROUS_BUILTINS denylist. The affected modules (diagnostics_channel, async_hooks, perf_hooks) are Node.js process-wide singletons, not sandbox-local constructs, so granting sandbox access to them exposes all host process data flowing through those channels. A publicly available exploit code exists confirming extraction of Bearer tokens and x-session-token headers from live host HTTP requests; this is not confirmed actively exploited (not in CISA KEV).

RemediationAI

Upgrade vm2 to version 3.11.4 (vendor-released patch: 3.11.4), which extends the DANGEROUS_BUILTINS denylist in lib/builtin.js to include diagnostics_channel, async_hooks, perf_hooks, and v8, reusing the existing two-layer enforcement (BUILTIN_MODULES filter and addDefaultBuiltin rejection with family-prefix and node:-normalised matching via isDangerousBuiltin). The patch commit is at https://github.com/patriksimek/vm2/commit/e1c48fce05189f48e71efbd32af0754efa4066bb and the release at https://github.com/patriksimek/vm2/releases/tag/v3.11.4. The fix preserves mock and override escape hatches, so legitimate uses of these modules via controlled configuration are unaffected. If immediate upgrade is not feasible, audit all NodeVM instantiation sites and explicitly exclude diagnostics_channel, async_hooks, perf_hooks, and v8 from any require.builtin allowlist - removing them from the list prevents sandbox access to these modules without requiring the library patch. As an architectural compensating control, run NodeVM sandboxes in isolated child processes or worker threads with no shared event loop with the host HTTP server; this prevents cross-process access to diagnostic channels entirely, though it introduces IPC latency overhead. Do not rely on application-level filtering of sandbox output alone, as the data exposure occurs inside the sandbox before any output is returned.

Affected VersionsENISA

vm2 < 3.11.4

Affected Packages

npm vm2 fix: 3.11.4

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 widely-used Node.js sandboxing library (pkg:npm/vm2) that restricts untrusted JavaScript by filtering access to Node.js built-in modules through a DANGEROUS_BUILTINS denylist enforced in lib/builtin.js. CWE-668 (Exposure of Resource to Wrong Sphere) is the root cause: the affected modules - diagnostics_channel, async_hooks, and perf_hooks - are process-wide singletons, not sandbox-local constructs. When allowed through require.builtin, diagnostics_channel enables subscription to Node.js internal HTTP lifecycle events (e.g., http.server.request.start), yielding full IncomingMessage objects with all headers; async_hooks.executionAsyncResource() exposes the current host AsyncResource or AsyncLocalStorage context, commonly used by host applications to propagate per-request identity and credentials; and perf_hooks.performance.getEntriesByType('mark') enumerates host performance timeline entries. The commit diff also reveals that v8 (heap snapshot/query access) was included in the same fix, extending the threat surface beyond what the original advisory description enumerated. Prior enforcement via BUILTIN_MODULES filter and addDefaultBuiltin rejection correctly blocked modules in the original DANGEROUS_BUILTINS list but left these four modules unaddressed.

Know when Node.js 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 (https://github.com/patriksimek/vm2) PRIMARY 6.9 MEDIUM
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N
Red Hat 8.6 MEDIUM

Primary rating from Vendor (https://github.com/patriksimek/vm2).

CVSS VectorVendor: https://github.com/patriksimek/vm2

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

Lifecycle Timeline

1
CVSS changed
Jun 12, 2026 - 15:22 NVD
6.9 (MEDIUM)

DescriptionCVE.org

Summary

NodeVM exposes some process-wide observability builtins when they are allowed through require.builtin.

The following builtins are not blocked by the dangerous builtin denylist:

text
diagnostics_channel
async_hooks
perf_hooks

These modules are process-wide, not sandbox-local. Sandboxed code can use them to observe host application data across the vm2 boundary.

Note: It is a host data exposure issue. The impact depends on whether the host application allows these builtins and uses HTTP, async request context, diagnostics channels, or performance marks in the same process.

Details

Non-denied builtins are exposed to the sandbox through lib/builtin.js:

js
builtins.set(key, special ? special : vm => vm.readonly(hostRequire(key)));

diagnostics_channel, async_hooks, and perf_hooks are not denied. These modules expose host process state rather than sandbox-local state.

Confirmed examples:

  1. diagnostics_channel lets sandboxed code subscribe to Node.js HTTP diagnostic channels such as http.server.request.start. The sandbox receives host HTTP request objects and can read headers such as Authorization or session tokens.
  2. async_hooks.executionAsyncResource() lets sandboxed code read the current host AsyncResource. If the host stores request/user data on that resource, the sandbox can read it.
  3. perf_hooks.performance.getEntriesByType('mark') lets sandboxed code read host performance timeline entries.

PoC

Run from the vm2 repository root:

bash
node poc/observability-builtins-info-leak.js

observability-builtins-info-leak.js

The PoC uses only the specific builtin being tested in each section.

It confirms:

text
diagnostics_channel: sandbox reads host HTTP request headers
async_hooks: sandbox reads host AsyncResource data
perf_hooks: sandbox reads host performance mark names

Example impact from the PoC:

text
authorization: Bearer HOST_HTTP_SECRET_...
x-session-token: HOST_HTTP_SECRET_...

These values are sent to a host HTTP server, but the sandbox reads them through diagnostics_channel.

<img width="997" height="566" alt="Screenshot 2026-05-10 at 1 13 20 PM" src="https://github.com/user-attachments/assets/36a7d600-8b53-4bfe-ab06-4e6dcfad5015" />

Impact

An attacker who can run untrusted JavaScript inside NodeVM with affected builtin settings can observe data from the host process.

In a real application, this may expose HTTP request headers, authorization tokens, session tokens, request context values, user identifiers, or other sensitive diagnostics data from the host application or from other users.

Suggested fix

Treat process-wide observability modules as dangerous builtins for untrusted sandboxes.

At minimum, consider blocking:

text
diagnostics_channel
async_hooks
perf_hooks

These modules are not sandbox-local and can expose host process state across the vm2 boundary.

Blast Radius

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

Ecosystem-wide dependent count for version 3.11.4.

Threat Intelligence Overview

EPSS Score
0.1%
Top 75% exploitable
Threat Intel
1
1 source
Data Quality
8 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.1%
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
Yes
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.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

Vendor StatusVendor

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