Skip to main content

vm2 CVE-2026-92958

| EUVDEUVD-2026-81607 HIGH
Improper Privilege Management (CWE-269)
8.4
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

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

  1. Access
    Submit JavaScript to vm2 sandbox
  2. Delivery
    Call require('fs/promises') bypassing -fs denylist
  3. Exploit
    Reach promise-based filesystem API
  4. Execution
    Invoke fsp.writeFile/rm/rename on host
  5. Impact
    Modify or destroy host files

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A06:2025 - Insecure Design
ASVS 5.0
V8 - Authorization Least privilege enforcement
MITRE ATT&CK

1 technique across 1 tactic: Privilege Escalation

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

Exploitation Conditions

Requires the embedder to configure NodeVM with the builtin wildcard combined with negative denylist entries - specifically a pattern like require: { builtin: ['*', '-fs', '-child_process'] } - because exact-name matching in lib/builtin.js leaves subpath modules (fs/promises, node:fs/promises) reachable. It also requires the fundamental vm2 deployment mode of executing attacker-controlled/untrusted JavaScript in the sandbox. It does NOT trigger on default configurations or on allowlist-style builtin restrictions; deployments that omit fs from an allowlist entirely, or that never use wildcard-plus-negative denylists, are not exposed. No user interaction and no host authentication beyond the ability to run sandbox code are needed.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:L/UI:N, VI:H/VA:L, SI:H/SA:L) scores 8.4 (High), reflecting network-reachable, low-complexity code execution against the host filesystem. However, this rating must be read through vm2's threat model: vm2 exists to run UNTRUSTED JavaScript, so the 'attacker' is simply anyone who can submit script to the sandbox - meaning the practical privilege barrier is even lower than PR:L implies (arguably PR:N). The real gating factor is CONFIGURATION, not exploitation difficulty: the flaw only triggers when the embedder uses the builtin wildcard WITH negative entries (e.g. builtin: ['*', '-fs', ...]), a deliberate non-default denylist pattern. No EPSS score, no CISA KEV entry, and no independent POC feed are present in the input, so there is no evidence of at-scale automated exploitation; the risk is realistic-but-conditional rather than mass-exploited. One conflict to flag: the vendor set VC:N (no confidentiality impact), yet the description explicitly states read operations via fs/promises are also reachable - confidentiality IS affected, so the vendor vector likely understates C. Net: a genuine, high-impact sandbox-escape class issue for the specific denylist configuration, but its blast radius is bounded by how many deployments use wildcard-plus-negative builtin lists.

Exploit ScenarioDerived

An application embeds vm2's NodeVM to run user-supplied JavaScript and hardens it with a denylist like require: { builtin: ['*', '-fs', '-child_process'] }, believing filesystem access is blocked. An attacker submits sandboxed code that calls require('fs/promises') (or require('node:fs/promises')), which the exact-name denylist never removed, and invokes fsp.writeFile() to create/overwrite files on the host. The advisory confirms host file creation and writing were demonstrated, so working exploit technique is publicly documented.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
1 public PoC 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 17, 2026

Sandbox escape in vm2 through 3.11.6 lets untrusted JavaScript executing inside a NodeVM bypass the configured builtin-module denylist and reach the host filesystem via require('fs/promises') or require('node:fs/promises'), allowing host file creation and modification (confirmed through fsp.writeFile()) plus cp, mkdir, rename, rm, rmdir, truncate and read operations on the host. Exposure is configuration-dependent: only embedders that combine the builtin wildcard with negative entries (for example require: { builtin: ['*', '-fs', '-child_process'] }) are affected, while default configurations and allowlist-style restrictions are not, and no public exploit identified at time of analysis. The flaw is fixed in vm2 3.11.7. Note that the supplied CVSS 4.0 vector carries PR:L while the independent assessment's CVSS 3.1 vector carries PR:N, so authentication requirements are not unambiguously confirmed from available data; exploitation in practice requires only the pre-existing ability to submit sandboxed code.

RemediationAI

Vendor-released patch: upgrade to vm2 3.11.7, which corrects the denylist matching so that negative entries applied alongside the builtin wildcard also cover subpath and node:-prefixed builtins; the advisory at https://github.com/patriksimek/vm2/security/advisories/GHSA-6rh5-qq4q-97xh and the VulnCheck advisory at https://www.vulncheck.com/advisories/vm2-before-3.11.7-denylist-bypass-via-fs-promises should be consulted for upgrade guidance. Where an immediate upgrade is not possible, the highest-value compensating control is to stop using wildcard-plus-negative denylist patterns and instead pass an explicit allowlist of the builtins the sandbox genuinely needs, deliberately excluding fs and child_process as well as their fs/promises, node:fs and node:fs/promises variants; the trade-off is that allowlists are brittle and will break sandboxed code that legitimately relies on additional builtins, so each code path must be regression-tested. Embedders who must keep the denylist shape can explicitly deny the subpath identifiers ('-fs/promises', '-node:fs/promises', '-node:fs', and related subpaths) in addition to '-fs', accepting that this remains an enumeration-based mitigation that can be bypassed by any subpath the maintainers did not anticipate. Because vm2 executes untrusted code with the privileges of the host process, defense in depth should be applied at the process boundary rather than inside the sandbox: run the vm2 host in a dedicated low-privilege account or ephemeral container with a read-only root filesystem and no unnecessary mounts, and apply seccomp/AppArmor restrictions - with the trade-off that these controls constrain legitimate host I/O the application may depend on and require environment-specific tuning. Note that the absence of a documented patch is not the case here; 3.11.7 is available and should be the primary action.

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 (CPE cpe:2.3:a:patriksimek:vm2:*:*:*:*:*:*:*:*, reported by VulnCheck, tagged Privilege Escalation) is a widely used third-party sandbox that runs untrusted JavaScript inside a Node.js host process, typically through the NodeVM class, and is commonly trusted to confine user-supplied code so it cannot touch the host. Its builtin-module policy is implemented in lib/builtin.js, where wildcard entries such as '*' are expanded and negative entries such as '-fs' are then applied by comparing the requested module identifier against the negative entry using exact module-name matching. Because Node.js exposes subpath builtins (fs/promises, and the node:-prefixed form node:fs/promises) as distinct module identifiers, denying 'fs' removes only the bare 'fs' builtin and leaves the promise-based filesystem surface reachable; the node: prefix is normalized inconsistently, so a '-node:fs/promises' entry likewise fails to block require('fs/promises'). The root cause belongs to CWE-269 (Improper Privilege Management): the sandbox's privilege-restriction mechanism does not cover the full module namespace, so the sandboxed principal silently acquires the host process's filesystem privileges instead of the reduced privileges the embedder intended to grant. Severity signals diverge across sources - the supplied CVSS 4.0 vector is 8.4 (AV:N/AC:L/AT:N/PR:L/UI:N, VI:H/VA:L, SI:H/SA:L) while the independent assessment scores CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:L - but both agree the escape yields high integrity impact on files reachable by the host process, with confidentiality impact (host file reads via fs/promises) also achievable. Deployment reachability, not exploit sophistication, is the limiting factor: the bug does not trigger on default configurations or on allowlist-style builtin restrictions, only on wildcard-plus-negative denylist patterns combined with the fundamental vm2 use case of executing attacker-controlled JavaScript in the sandbox.

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

vm2 accepts untrusted script so PR:N; sandbox-to-host escape is S:C; fs/promises grants host read (C:H) and write/delete (I:H), with A:L for file destruction.

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

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

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

Lifecycle Timeline

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

DescriptionCVE.org

vm2 through 3.11.6 contains a builtin-module denylist bypass in NodeVM. When the embedder uses the builtin wildcard together with negative entries (e.g. require: { builtin: ['*', '-fs', '-child_process'] }), negative entries are matched by exact module name in lib/builtin.js, so -fs removes only the builtin named fs and does not remove builtin subpaths such as fs/promises. Sandboxed code can therefore call require('fs/promises') or require('node:fs/promises') and reach the promise-based filesystem API despite fs being denied; node: prefix handling is likewise inconsistent (a -node:fs/promises entry does not block require('fs/promises')). Host file creation and writing were confirmed via fsp.writeFile(), and other fs/promises operations (cp, mkdir, rename, rm, rmdir, truncate, read operations, etc.) are also reachable. This issue is fixed in vm2 3.11.7.

Technical POC Analysis

The flaw is an incomplete denylist match in vm2's builtin-module resolution.

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

Latest POC

1 public PoC link from github

Sign in to open the public PoC links collected for this CVE.

Executive ViewAI

Why It Matters

Organizations using vm2 through 3.11.6 to sandbox untrusted JavaScript face a high-severity sandbox escape that, under specific non-default configurations, allows code to reach the host filesystem for file creation, modification, and deletion. This undermines the isolation boundary that applications rely on to safely execute third-party or user-supplied code, potentially leading to data tampering, service disruption, or unauthorized system changes. No public exploit identified at time of analysis, but affected embedders should treat the risk as material because the flaw is fixed only in vm2 3.11.7 and requires configuration review to confirm exposure.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 79% exploitable
Prevalence
Medium
popular but deprecated Node.js sandbox library, still embedded in many projects
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 HIGH
CISA KEV No
Public POC Yes
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· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

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

Attack Technique

Privilege escalation occurs when an attacker leverages flaws in access control mechanisms to gain permissions beyond what they were originally granted.

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