Skip to main content

vm2 CVE-2026-92946

| EUVDEUVD-2026-81595 CRITICAL
Improper Control of Dynamically-Managed Code Resources (CWE-913)
10.0
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Submit malicious JS to vm2 sandbox
  2. Delivery
    require('vm2') via enabled require.external
  3. Exploit
    Instantiate unrestricted NodeVM instance
  4. Execution
    Invoke child_process for OS commands
  5. Impact
    Execute arbitrary code on host

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V15 - Secure Coding and Architecture Dynamic code resource control
Exploitation Conditions

Requires the embedding application to (1) run untrusted attacker-supplied JavaScript inside vm2 (the sandbox's threat model) AND (2) enable require.external WITHOUT an explicit require.root that excludes node_modules - this specific configuration is the trigger. Under that config the sandbox can require('vm2') itself and build an unrestricted NodeVM. Limiting factors: both preconditions are operator-chosen and non-default; applications that leave require.external disabled, or that set require.root to exclude node_modules, are not exploitable. Fixed in vm2 3.11.7. No user interaction or host-side authentication beyond the ability to feed code into the sandbox.

Impact

CVSS 4.0 base scores 10.0 (all impact metrics High, AV:N/AC:L/PR:N/UI:N with subsequent-system SC:H/SI:H/SA:H reflecting a full sandbox escape), which is credible for a working host RCE: sandboxed code escapes to run arbitrary OS commands via child_process. However, this maximal score is conditional. The vulnerability only manifests when the embedding application enables require.external WITHOUT setting a require.root that excludes node_modules - a non-default, operator-chosen configuration. It also presupposes the core vm2 threat model: the application is deliberately running attacker-controlled JavaScript inside the sandbox. No EPSS score, no CISA KEV listing, and no independently confirmed public exploit are present in the input (a POC is likely embedded in the GHSA advisory but is not confirmed here). So this is a genuine high-severity RCE for the specific population running the vulnerable config, but the 10.0 overstates blanket real-world risk: exploitation is gated on both a misconfiguration and an application design that feeds untrusted code to vm2. Treat as high priority for any service that loads untrusted JS in vm2 with require.external enabled; deprioritize elsewhere. Note vm2 is deprecated/unmaintained, which raises exposure for laggards but lowers the count of actively-maintained deployments.

Exploit ScenarioDerived

An application uses vm2 to execute untrusted user-supplied JavaScript and has enabled require.external to let sandboxed code load modules, without an explicit require.root excluding node_modules. The attacker submits JS that does require('vm2'), spins up a fresh unrestricted NodeVM, and from it calls child_process to run host OS commands (e.g. spawn a reverse shell). A POC is likely present in the vendor advisory, though not independently confirmed here.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.6% exploitation probability (EPSS)

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

Alert me

AnalysisAIv1 – Sep 17, 2026

Sandbox escape leading to remote code execution affects the vm2 Node.js sandbox library before version 3.11.7 when the embedding application enables require.external without an explicit require.root that excludes node_modules. Under that configuration, attacker-supplied JavaScript running inside the sandbox can require vm2's own package, construct an unrestricted NodeVM instance, and then execute arbitrary host OS commands through child_process, yielding a complete escape from the sandbox to the underlying operating system. Exploitation requires two operator-chosen, non-default preconditions (running untrusted code in vm2 AND the permissive require configuration), so deployments that leave require.external disabled or pin require.root away from node_modules are not exposed; no public exploit code was identified at time of analysis, and the vendor-released fix is version 3.11.7.

RemediationAI

Upgrade vm2 to 3.11.7 or later - this is the vendor-released patch for CVE-2026-92946, and it is the only complete fix. If upgrading must be staged, apply the two compensating controls that directly neutralize the escape path: either disable require.external entirely so the sandbox cannot resolve modules outside the built-in set, or set require.root to a dedicated directory that contains only the modules the sandbox legitimately needs and explicitly excludes node_modules (and therefore vm2's own package). The trade-off for both workarounds is functional: applications that rely on sandboxed code loading third-party Node modules will fail to resolve those modules until require.external is re-enabled with a correctly scoped require.root, so any interim configuration should be validated against the sandbox's expected module-loading behavior. Because exploitation depends on attacker-controlled code already reaching the sandbox, also review what gates code submission to vm2 and whether the sandbox is used to run input from untrusted or lower-privileged sources, since removing that exposure eliminates the attack surface regardless of library version. Details are in the GitHub advisory (https://github.com/patriksimek/vm2/security/advisories/GHSA-j3hm-6rg5-mchv) and the VulnCheck advisory (https://www.vulncheck.com/advisories/vm2-before-3.11.7-remote-code-execution-via-require-external).

Affected VersionsENISA

vm2 0 <3.11.7

Affected Packages

npm vm2 fix: 3.11.7

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 sandbox library designed to execute untrusted JavaScript with restricted access to the host, and it is commonly embedded in plugin systems, CI runners, and multi-tenant JavaScript execution services. The flaw is classified as CWE-913 (Improper Control of Dynamically-Managed Code Resources): when require.external is enabled without an explicit require.root that excludes node_modules, the sandbox's module resolver can reach vm2's own installed package rather than being confined to a safe root. Sandboxed code therefore re-enters the library's own API surface, instantiates a NodeVM without the restrictions the host application intended, and gains the full Node.js runtime, from which child_process provides arbitrary host command execution. The CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:* covers all released vm2 versions prior to 3.11.7. The supplied CVSS 4.0 vector scores 10.0 with all impact metrics High and subsequent-system scores SC:H/SI:H/SA:H, consistent with an independent assessment of CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H, which rates attack complexity High because both the untrusted-code execution model and the specific require.external/require.root misconfiguration must be present; no user interaction is required beyond the ability to feed JavaScript into the sandbox, and authentication requirements are limited to whatever gate the host application places on that code submission.

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 10.0 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
vuln.today AI 9.0 CRITICAL

Network-reachable sandbox with attacker code and full host RCE (S:C, C/I/A:H, PR:N per vm2 threat model), but AC:H because it depends on the non-default require.external-without-excluding-require.root configuration.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

Lifecycle Timeline

2
Patch available
Sep 17, 2026 - 15:17 EUVD
CVE Published
Sep 17, 2026 - 13:46 cve.org
CRITICAL 10.0

DescriptionCVE.org

vm2 before 3.11.7 contains a remote code execution vulnerability when require.external is enabled without an explicit require.root that excludes node_modules. Sandboxed code can require vm2's own package, instantiate an unrestricted NodeVM instance, and execute arbitrary host OS commands via child_process.

Technical POC Analysis

CWE-913: Improper Control of Dynamically-Managed Code Resources.

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

A critical sandbox escape in the vm2 Node.js library (versions before 3.11.7) lets attacker-supplied JavaScript break out of its sandbox and execute arbitrary commands on the underlying host operating system, giving an intruder full control of any affected server. Exposure is limited to applications that both run untrusted code inside vm2 and enable the non-default require.external setting without a require.root that excludes node_modules, but where those conditions apply the exposure is total and warrants immediate remediation.

Business Impact: High
Compensating Controls

Disable require.external and set require.root to a directory that excludes node_modules so the sandbox cannot load vm2's own package; run untrusted code in a separate low-privilege container or process with no host credentials, read-only filesystems, and restricted egress; monitor for child_process spawning from Node processes as a detection signal. Advisory-named fix is vm2 3.11.7 - validate availability and apply.

Threat Intelligence Overview

EPSS Score
0.6%
Top 53% exploitable
Prevalence
Medium
popular but deprecated Node.js sandbox library, common in code-execution services
Threat Intel
1
1 source
Data Quality
4 sources
Confidence: Medium

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 CRITICAL
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
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· derived
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

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

Attack Technique

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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