CVE-2026-24118

VM2 Sandbox Breakout Through __lookupGetter__

Published May 4, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, VM2 suffers from a sandbox breakout vulnerability. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This issue has been patched in version 3.11.0.

Analysis

AI-generated

Technical impact

vm2 is an open-source JavaScript virtual machine designed to sandbox Node.js code. The flaw arises from an unsafe use of the __lookupGetter__ method, allowing code executed inside the vm2 sandbox to escape and execute arbitrary commands on the host system. This represents a classic code injection weakness (CWE‑94) combined with inadequate isolation controls (CWE‑693 and CWE‑749). If exploited, an attacker could compromise the entire host environment, gaining full read/write/execute privileges.

Affected Systems

The issue affects the patriksimek vm2 package in all releases prior to version 3.11.0. Systems that incorporate the older vm2 library and provide untrusted code to the sandbox are vulnerable. The vulnerability was fixed in vm2 releases starting at v3.11.0.

Risk and Exploitability

The vulnerability has a CVSS score of 9.8, indicating critical severity. The EPSS score of 0.00162 demonstrates a very low but non‑zero exploitation probability. The vulnerability is not listed in the CISA KEV catalog. The likely attack vector is a user who can supply code to vm2; via malicious exploitation of __lookupGetter__, that code can break out of the sandbox. The exploit requires the attacker to run within a Node.js process that includes vm2, so it may be local or remote depending on how the library is exposed. Timely patching is essential due to the high impact of remote code execution.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade vm2 to version 3.11.0 or later, which removes the unsafe __lookupGetter__ usage.
  • If an immediate upgrade is not possible, eliminate any use of vm2 for untrusted code and consider replacing it with a more secure sandboxing solution.
  • Apply input validation and strict access controls around code that is executed within vm2, ensuring that only trusted code is evaluated in the sandbox.

Generated by OpenCVE AI on May 16, 2026 at 01:55 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-grj5-jjm8-h35p VM2 Sandbox Breakout Through __lookupGetter__
History
Type Values Removed Values Added
First Time appeared Vm2 Project
Vm2 Project vm2
CPEs cpe:2.3:a:vm2_project:vm2:*:*:*:*:*:node.js:*:*
Vendors & Products Vm2 Project
Vm2 Project vm2
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Patriksimek
Patriksimek vm2
Vendors & Products Patriksimek
Patriksimek vm2
Type Values Removed Values Added
Description vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, VM2 suffers from a sandbox breakout vulnerability. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This issue has been patched in version 3.11.0.
Title VM2 Sandbox Breakout Through __lookupGetter__
Weaknesses CWE-693
CWE-94
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-693

    Protection Mechanism Failure

  • CWE-749

    Exposed Dangerous Method or Function

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 15, 2026, 1:17 AM
Reserved
Jan 21, 2026, 6:38 PM
Status
Modified
Published
May 4, 2026, 5:16 PM
Modified
Oct 26, 2026, 7:10 PM
Severity
Important
Public date
May 4, 2026, 4:28 PM