Description
vm2 before 3.11.8 does not fully enforce the allowAsync: false option in VM and NodeVM. While localPromise.prototype.then is replaced with a handler that throws 'Async not available', the sandbox's Promise static methods (Promise.resolve, Promise.all, Promise.race, Promise.any, and Promise.allSettled) still assimilate attacker-supplied thenables: native promise resolution performs PromiseResolveThenableJob and invokes the sandboxed code's then method in a microtask without passing through the patched then, so the async restriction is never applied. As a result, sandboxed script can schedule work that runs after VM.run() or NodeVM.run() has returned and outside the configured timeout, continuing to execute after the host believes execution is complete.
Published: 2026-09-17
Score: 7.1 High
EPSS: < 1% Very Low
KEV: No
Impact: Execution outside sandbox (Privilege Escalation)
Action: Apply Patch
AI Analysis

Impact

The vm2 sandbox fails to enforce the allowAsync:false restriction. When the localPromise prototype’s then is patched to throw an error, the static Promise methods still accept attacker‑supplied thenables. The native promise resolution logic calls the sandbox’s then method in a microtask, bypassing the patched handler. As a result, input code can schedule work that executes after VM.run() or NodeVM.run() has returned, and after the configured timeout, allowing the attacker to run code outside the intended sandbox boundaries, effectively escaping the isolation enforced by vm2. This exposes the host to arbitrary code execution in its own process space. The weakness is a CWE‑693 runtime state manipulation issue.

Affected Systems

The vulnerability impacts the vm2 npm package produced by patriksimek. All release versions older than 3.11.8 are affected. Projects that instantiate a VM or NodeVM with allowAsync set to false while executing untrusted code are at risk.

Risk and Exploitability

The CVSS score of 7.1 indicates a high severity; the EPSS score is not available, and the flaw is not listed in the CISA KEV catalog. Exploitation requires control over the code that is run inside the vm2 sandbox, so the attack is an internal privilege escalation rather than a remote or network‑based vector. An attacker who can supply untrusted JavaScript to a vm2 instance that expects strict async restrictions can inject a thenable, cause a microtask to execute after the sandbox finishes, and run arbitrary code in the host process. Because the vulnerability is purely local and does not involve external network connections, detection depends on observing unexpected asynchronous execution after VM.run returns.

Generated by OpenCVE AI on September 17, 2026 at 23:34 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade to vm2 3.11.8 or newer, where the allowAsync guard is correctly applied to all Promise operations.
  • If an immediate upgrade is not possible, avoid using the allowAsync:false option with code that may produce thenables; eliminate or sanitize Promise usage that can be hijacked.
  • Implement host‑side monitoring or stronger process isolation to detect or block unexpected work scheduled after VM.run returns.

Generated by OpenCVE AI on September 17, 2026 at 23:34 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-f8gf-w286-fmq2 vm2: `allowAsync: false` can be bypassed through Promise thenable assimilation in VM and NodeVM
History

Mon, 21 Sep 2026 21:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 18 Sep 2026 00:15:00 +0000

Type Values Removed Values Added
Weaknesses CWE-358
References
Metrics threat_severity

None

threat_severity

Important


Thu, 17 Sep 2026 23:15:00 +0000

Type Values Removed Values Added
First Time appeared Patriksimek
Patriksimek vm2
Vendors & Products Patriksimek
Patriksimek vm2

Thu, 17 Sep 2026 14:00:00 +0000

Type Values Removed Values Added
Description vm2 before 3.11.8 does not fully enforce the allowAsync: false option in VM and NodeVM. While localPromise.prototype.then is replaced with a handler that throws 'Async not available', the sandbox's Promise static methods (Promise.resolve, Promise.all, Promise.race, Promise.any, and Promise.allSettled) still assimilate attacker-supplied thenables: native promise resolution performs PromiseResolveThenableJob and invokes the sandboxed code's then method in a microtask without passing through the patched then, so the async restriction is never applied. As a result, sandboxed script can schedule work that runs after VM.run() or NodeVM.run() has returned and outside the configured timeout, continuing to execute after the host believes execution is complete.
Title vm2 before 3.11.8 allowAsync Bypass via Promise Thenable
Weaknesses CWE-693
References
Metrics cvssV3_1

{'score': 7.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:H'}

cvssV4_0

{'score': 7.1, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:L/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-09-21T20:41:28.710Z

Reserved: 2026-09-17T12:43:31.527Z

Link: CVE-2026-92959

cve-icon Vulnrichment

Updated: 2026-09-21T20:41:23.056Z

cve-icon NVD

Status : Deferred

Published: 2026-09-17T14:18:02.130

Modified: 2026-09-21T21:17:16.917

Link: CVE-2026-92959

cve-icon Redhat

Severity : Important

Publid Date: 2026-09-17T13:46:16Z

Links: CVE-2026-92959 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-09-17T23:45:17Z

Weaknesses
  • CWE-358

    Improperly Implemented Security Check for Standard

  • CWE-693

    Protection Mechanism Failure