Skip to main content

vm2 CVE-2026-100722

| EUVDEUVD-2026-87857 HIGH
Uncaught Exception (CWE-248)
8.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 VM.run
  2. Delivery
    Invoke constructable host function with `new`
  3. Exploit
    Constructor returns native rejected Promise
  4. Execution
    Rejection crosses bridge unhandled via construct trap
  5. Persist
    Node promotes to uncaught exception
  6. Impact
    Host process terminates (DoS)

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Exception handling completeness
Exploitation Conditions

Exploitation requires that the embedding application (1) runs untrusted scripts through vm2's VM.run, and (2) exposes to the sandbox a constructable host function whose constructor returns a native rejected Promise - this specific embedder integration is the AT:P precondition and is not vm2's default behavior. It further depends on running under Node's strict unhandled-rejection policy (default in modern Node versions), which promotes the unhandled rejection to a process-terminating uncaught exception. No authentication or user interaction beyond the attacker submitting a script is needed (PR:N/UI:N), because feeding untrusted code to the sandbox is the intended use case. Deployments of vm2 that do not expose such a constructable, Promise-returning host constructor are not exploitable via this path.

Impact

This is a genuine but conditional denial-of-service issue, not an inflated high-CVSS finding. The vendor CVSS 4.0 score of 8.9 is driven entirely by availability (VA:H/SA:H) with VC:N/VI:N - there is no confidentiality or integrity impact, only host process termination via CWE-248 (uncaught exception). Signals are consistent internally: AV:N/PR:N/UI:N reflect the sandbox threat model (any untrusted script run via VM.run is the attacker), while AT:P correctly captures the required precondition that the embedder must expose a constructable host function whose constructor returns a native rejected Promise - a non-default integration pattern that meaningfully narrows real-world exposure. No EPSS score, KEV listing, or POC is present in the input, so exploitation must be treated as no public exploit identified at time of analysis. The 8.9 is high because a full host-process crash is severe for a security library whose entire purpose is safely running untrusted code, but the specific embedder configuration requirement means it is not universally exploitable against every vm2 deployment. Note: vm2 is deprecated (unmaintained since 2023), which raises the practical concern that many embedders will not patch - argue for prioritizing migration to isolated-vm over relying on the 3.12.2 fix alone.

Exploit ScenarioDerived

A service embeds vm2 to run untrusted user scripts and exposes to the sandbox a constructable host function whose constructor internally returns a native rejected Promise. An attacker submits a script that calls that function with new and discards the result; the rejected host Promise crosses the sandbox-to-host bridge without markHostPromiseHandled() being applied on the construct path, and under Node's strict unhandled-rejection policy it becomes an uncaught exception that terminates the entire host process. No public exploit code is identified in the available data.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.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

Denial of service in vm2 sandboxes before 3.12.2 allows an untrusted script running via VM.run to terminate the host Node.js process. The BaseHandler construct trap returns Reflect.construct's result without calling markHostPromiseHandled() the way the adjacent apply trap does, so if an embedder exposes a constructable host function whose constructor returns a resident rejected Promise, invoking it with new and discarding the result lets the rejection cross the sandbox bridge unhandled; under Node's default strict unhandled-rejection policy this is promoted to a process-terminating uncaught exception. The bug is unauthenticated in the sense that the attacker only needs to submit script code (PR:N/UI:N), but exploitation is conditional: it requires a specific embedder integration exposing such a constructable Promise-returning host constructor, which is the AT:P precondition and is not vm2 default behavior; no public exploit code was identified at time of analysis and the issue is not in CISA KEV.

RemediationAI

Upgrade vm2 to 3.12.2 or later, which applies the same host-side Promise rejection handling (markHostPromiseHandled()) to the construct trap that the apply trap already received; this is the primary and only vendor fix, and no backport has been indicated, so the upgrade should be treated as mandatory for affected embedders. Consult the GitHub advisory GHSA-2v2p-6j97-cjg9 and the VulnCheck advisory linked above for confirmation of the patched release. Where an immediate upgrade is not possible, the most effective compensating control is to stop exposing constructable host functions that can return a rejected native Promise - wrap or proxy such constructors so they attach a .catch()/then handler before the value returns across the bridge, or remove them from the sandbox global entirely; the trade-off is reduced functionality for guest scripts that legitimately use those constructors. Isolating the sandbox in a separate worker thread or child process limits the blast radius so an uncaught rejection terminates the worker rather than the host process, at the cost of added IPC complexity and the need to supervise and restart workers. Running Node with --unhandled-rejections=warn (or the equivalent policy override) prevents the promotion to an uncaught exception, but this masks all unhandled rejections application-wide and can hide genuine bugs, so it should be seen as a temporary stopgap rather than a fix. Since exploitation is contingent on a specific, non-default embedder integration, organizations should first audit whether their VM.run surface actually exposes such a Promise-returning constructable host function before prioritizing emergency change control.

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 mediates between untrusted guest scripts and host objects through a set of traps implemented in BaseHandler, its Proxy handler. One family of traps must sanitize promises that originate on the host side: when a host function returns a native Promise, vm2 must attach a rejection handler (the internal markHostPromiseHandled() call) so that a rejection the guest never observes does not bubble up as an unhandled rejection in the host realm. The apply trap performs this sanitization, but the construct trap - the code path taken when the guest uses new on a proxied host function - simply returns the output of Reflect.construct without applying the same treatment. The root cause class is CWE-248 (Uncaught Exception): a native Promise rejected in the host realm has no attached handler, and Node's modern default unhandled-rejection behavior escalates it to an uncaught exception that crashes the process. Note that the reported CVSS 4.0 vector (CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H, score 8.9) and the independent CVSS 3.1 assessment (AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H) both agree on the confidentiality/integrity-neutral, availability-only impact and on the AT:P / AC:H precondition, differing chiefly in how strictly that precondition is weighted. CPE data (cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:*) confirms the affected component is the patriksimek vm2 package itself across all versions prior to the fix.

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 8.9 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:H
vuln.today AI 6.8 MEDIUM

AC:H because it needs a specific non-default embedder-exposed constructable host function returning a rejected Promise; PR:N/UI:N as running untrusted script is vm2's model; S:C sandbox-to-host; availability-only A:H.

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

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
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
High

Lifecycle Timeline

2
Patch available
Sep 27, 2026 - 03:16 EUVD
CVE Published
Sep 27, 2026 - 01:28 cve.org
HIGH 8.9

DescriptionCVE.org

vm2 before 3.12.2 does not apply host-side Promise rejection handling in the sandbox-to-host construct trap. In BaseHandler, the apply trap calls markHostPromiseHandled() on the returned value, but the adjacent construct path returns the result of Reflect.construct without the same sanitization. If an embedder exposes a constructable host function whose constructor returns a native rejected Promise, an untrusted script executed via VM.run can invoke it with new and ignore the result; the rejected host Promise crosses the bridge unhandled and, under Node's strict unhandled-rejection policy, is promoted to an uncaught exception that terminates the host process.

Technical POC Analysis

Evidence note: the supplied advisory records CVSS 8.6 (AV:N/AC:L/PR:N/UI:N/S:C/C:N/I:N/A:H) and "No known CVE"; the CVE ID and 8.9 score come from the task header, not the advisory text.

Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.

Executive ViewAI

Why It Matters

vm2, the Node.js sandbox library used to execute untrusted scripts inside our applications, can be coerced into terminating the entire host Node.js process, turning a single submitted script into a denial-of-service event for any service that embeds it. Exposure is conditional rather than universal: it requires an integration that exposes a constructable host function whose constructor returns a rejected Promise, so default vm2 usage is not affected, but teams running that pattern should treat service availability as the risk. Leadership should care because these sandboxes typically sit in front of internet-facing or customer-submitted code paths, where a process crash means visible downtime and unpredictable restart behavior.

Business Impact: Medium
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: stop exposing constructable host constructors that return rejected Promises to sandboxed code (the required AT:P precondition is an embedder integration choice, not vm2 default behavior); run untrusted script execution in isolated child processes or worker threads with resource limits, health checks, and supervised restart so a killed process does not take down the parent service; install a global unhandledRejection handler or run Node.js in a non-process-terminating unhandled-rejection mode; restrict who can submit script code to the sandbox and rate-limit or queue submissions; monitor for abnormal process exits and repeated restarts as an exploitation indicator. Note that exploitation is unauthenticated with respect to the submitted script (PR:N/UI:N) and no public exploit identified at time of analysis.

Threat Intelligence Overview

EPSS Score
0.3%
Top 84% exploitable
Prevalence
Medium
historically huge npm sandbox library, now deprecated with declining but broad embedded footprint
Threat Intel
1
1 sources
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor GitHub

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 HIGH
CISA KEV No
Public POC No
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.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
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
Medium
Technical Impact
Partial

Priority Score

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

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