Description
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining Buffer.call.call({}.__lookupGetter__, Buffer, "__proto__"), Buffer.call.call({}.__lookupSetter__, Buffer, "__proto__"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox. This allows attackers to run arbitrary code. This issue has been patched in version 3.11.4.
Published: 2026-06-12
Score: 10 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability in the vm2 sandbox arises from an exploit that combines multiple JavaScript prototype manipulation techniques involving Buffer.__lookupGetter__ and Buffer.__lookupSetter__, together with a Node.js ERR_INVALID_ARG_TYPE Error. By doing so, an attacker can obtain a reference to the host's TypeError constructor, effectively breaking out of the sandbox and gaining the ability to execute arbitrary code within the host environment. This flaw belongs to CWE‑913, which describes user‑controlled content that can be used to subvert security confines. The consequence of a successful exploit is complete loss of integrity and confidentiality for the system running the affected vm2 instance.

Affected Systems

Any Node.js application that includes the vm2 library version older than 3.11.4 is susceptible to the exploit. The vulnerable code path exists in all releases up to and including 3.11.3 and is present in any deployment that permits untrusted code to be passed to vm2. Users of vm2 prior to the v3.11.4 release should review their dependencies and confirm the version they are running.

Risk and Exploitability

The CVSS score for this vulnerability is 10, indicating maximal severity. While the EPSS score is less than 1%, the exploitation probability remains non‑zero due to the widespread usage of vm2 in development environments, and it is not listed in any current KEV catalog, meaning there have been no publicly confirmed exploit campaigns. The likely attack vector is local or semi‑trusted code that has access to the vm2 library, such as a web application that evaluates user input inside a sandbox. An attacker with the ability to supply code to vm2 can convert the sandbox into a trusted code context, thereby executing arbitrary instructions on the host machine. The failure to contain sandboxed code elevates the risk to complete system compromise.

Generated by OpenCVE AI on June 12, 2026 at 15:25 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the vm2 dependency to version 3.11.4 or later, which removes the prototype manipulation flaw.
  • Audit the application code to eliminate any direct use of Buffer.call or related methods that interact with vm2’s internals for untrusted data.
  • Limit the privileges of the Node.js process that hosts vm2 to the minimum required for functionality and monitor for anomalous error patterns that may indicate sandbox escape attempts.

Generated by OpenCVE AI on June 12, 2026 at 15:25 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-v6mx-mf47-r5wg vm2 has a Sandbox Escape issue
History

Fri, 12 Jun 2026 15:45:00 +0000

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

Fri, 12 Jun 2026 14:30:00 +0000

Type Values Removed Values Added
Description vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.4, by combining Buffer.call.call({}.__lookupGetter__, Buffer, "__proto__"), Buffer.call.call({}.__lookupSetter__, Buffer, "__proto__"), and Node.js's ERR_INVALID_ARG_TYPE Error, the host's TypeError constructor can be obtained, which allows the escape from the sandbox. This allows attackers to run arbitrary code. This issue has been patched in version 3.11.4.
Title vm2: Sandbox Escape
Weaknesses CWE-913
References
Metrics cvssV3_1

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


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-12T14:14:17.037Z

Reserved: 2026-05-18T19:50:18.695Z

Link: CVE-2026-47131

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Deferred

Published: 2026-06-12T15:16:27.870

Modified: 2026-06-12T16:03:15.620

Link: CVE-2026-47131

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-12T15:30:31Z

Weaknesses
  • CWE-913

    Improper Control of Dynamically-Managed Code Resources