Staging Environment: Content and features may be unstable or change without notice.
Search for packages
Package details: pkg:npm/vm2@3.6.0
purl pkg:npm/vm2@3.6.0
Next non-vulnerable version 3.11.4
Latest non-vulnerable version 3.11.4
Risk 10.0
Vulnerabilities affecting this package (30)
Vulnerability Summary Fixed by
VCID-3srt-uk7n-xqcw
Aliases:
CVE-2021-23555
GHSA-6pw2-5hjv-9pf7
Sandbox bypass in vm2
3.9.6
Affected by 28 other vulnerabilities.
VCID-55dr-v6ew-s3e8
Aliases:
CVE-2026-44006
GHSA-qcp4-v2jj-fjx8
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, It is possible to reach BaseHandler.getPrototypeOf, which can be used to get arbitrary prototypes. This vulnerability is fixed in 3.11.0.
3.11.0
Affected by 5 other vulnerabilities.
VCID-598j-pe72-qkh3
Aliases:
CVE-2026-45411
GHSA-248r-7h7q-cr24
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.3, it is possible to catch a host exception using the yield* expression inside an async generator. When the generator is closed using the return function, the value is awaited on and exceptions thrown in the then call will be caught by the runtime and passed to the yield* iterator as the next value. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This vulnerability is fixed in 3.11.3.
3.11.3
Affected by 10 other vulnerabilities.
VCID-5xbq-86wn-77c4
Aliases:
CVE-2019-10761
GHSA-wf5x-cr3r-xr77
vm2 before 3.6.11 vulnerable to sandbox escape
3.6.11
Affected by 29 other vulnerabilities.
VCID-6fr8-3aqn-wyce
Aliases:
CVE-2026-43997
GHSA-47x8-96vw-5wg6
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, it is possible to obtain the host Object. There are various ways to use the host Object, to escape the sandbox, one example would be using HostObject.getOwnPropertySymbols to obtain Symbol(nodejs.util.inspect.custom). This vulnerability is fixed in 3.11.0.
3.11.0
Affected by 5 other vulnerabilities.
VCID-6n7e-fz65-jfds
Aliases:
CVE-2023-37903
GHSA-g644-9gfx-q4q4
There are no reported fixed by versions.
VCID-77zs-22q5-d7ev
Aliases:
CVE-2026-44000
GHSA-mpf8-4hx2-7cjg
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, a sandbox boundary violation in vm2 allows host object identity to cross into the sandbox through host Promise resolution. When a host-side Promise that resolves to a host object is exposed to the sandbox, the value delivered to the sandbox .then() callback preserves host identity. This allows the sandbox to interact with the host object directly, including performing identity checks using host-side WeakMap and mutating host object state from inside the sandbox. This behavior occurs because the Promise fulfillment wrapper uses ensureThis() instead of the stronger cross-realm conversion path (from() / proxy wrapping). If no prototype mapping is found, ensureThis() returns the original object. As a result, objects resolved by host Promises can cross the sandbox boundary without proper isolation. This vulnerability is fixed in 3.11.0.
3.11.0
Affected by 5 other vulnerabilities.
VCID-8he7-t256-1yct
Aliases:
CVE-2026-24781
GHSA-v37h-5mfm-c47c
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, VM2 suffers from a sandbox breakout vulnerability through the inspect function. 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.
3.11.0
Affected by 5 other vulnerabilities.
VCID-8pe8-9mh9-27f3
Aliases:
CVE-2026-44003
GHSA-wp5r-2gw5-m7q7
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, vm2's code transformer has a performance optimization that skips AST analysis when the code does not contain catch, import, or async keywords. This fast-path bypass allows sandboxed code to directly access the internal VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL variable, which exposes internal security functions (handleException, wrapWith, import). This vulnerability is fixed in 3.11.0.
3.11.0
Affected by 5 other vulnerabilities.
VCID-8zk3-a7sw-u7an
Aliases:
CVE-2026-44009
GHSA-9vg3-4rfj-wgcm
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.2, This vulnerability is fixed in 3.11.2.
3.11.2
Affected by 1 other vulnerability.
VCID-bcct-j6mk-z7hu
Aliases:
CVE-2026-44004
GHSA-6785-pvv7-mvg7
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, sandboxed code can call Buffer.alloc() with an arbitrary size to allocate memory directly on the host heap. Because Buffer.alloc is a synchronous C++ native call, vm2's timeout option cannot interrupt it. A single request can exhaust host memory and crash the process with a FATAL ERROR: Reached heap limit. This vulnerability is fixed in 3.11.0.
3.11.0
Affected by 5 other vulnerabilities.
VCID-ct4r-vjm4-4qby
Aliases:
CVE-2022-36067
GHSA-mrgp-mrhc-5jrq
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. In versions prior to version 3.9.11, a threat actor can bypass the sandbox protections to gain remote code execution rights on the host running the sandbox. This vulnerability was patched in the release of version 3.9.11 of vm2. There are no known workarounds.
3.9.11
Affected by 26 other vulnerabilities.
VCID-g93v-7a6d-5bfm
Aliases:
CVE-2026-44008
GHSA-9qj6-qjgg-37qq
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.2, the new method neutralizeArraySpeciesBatch works with objects from the other side but can call into this side via getter on the array prototype exposing objects of the wrong side into the sandbox. This can be used to get host objects and get the host Function object. This allows attackers to write code which can escape from the VM2 sandbox and execute arbitrary commands on the host system. This vulnerability is fixed in 3.11.2.
3.11.2
Affected by 1 other vulnerability.
VCID-gvhg-db7k-57ey
Aliases:
CVE-2026-26332
GHSA-55hx-c926-fr95
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.11.0, SuppressedError allows attackers to escape the sandbox and run arbitrary code. This issue has been patched in version 3.11.0.
3.11.0
Affected by 5 other vulnerabilities.
VCID-hb4z-qz2p-rqc5
Aliases:
CVE-2026-44001
GHSA-hw58-p9xv-2mjh
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, a sandbox escape vulnerability in vm2 v3.10.5 allows any sandboxed code to crash the host Node.js process via a single Promise constructor that triggers an unhandled rejection propagating to the host. The fix for CVE-2026-22709 (v3.10.2) only sanitized the onRejected callback in .then() and .catch() overrides and did not address the executor-to-unhandledRejection path. This vulnerability is fixed in 3.11.0.
3.11.0
Affected by 5 other vulnerabilities.
VCID-k9q9-7mgb-rbbf
Aliases:
CVE-2026-26956
GHSA-ffh4-j6h5-pg66
vm2 is an open source vm/sandbox for Node.js. In version 3.10.4, vm2 is vulnerable to full sandbox escape with arbitrary code execution. Attacker code inside VM.run() obtains host process object and runs host commands with zero host cooperation. This issue has been patched in version 3.10.5.
3.10.5
Affected by 18 other vulnerabilities.
VCID-kjca-h5yw-cudv
Aliases:
CVE-2026-24118
GHSA-grj5-jjm8-h35p
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.
3.11.0
Affected by 5 other vulnerabilities.
VCID-mqs7-x7bh-17ef
Aliases:
CVE-2023-30547
GHSA-ch3r-j5x3-6q2m
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. There exists a vulnerability in exception sanitization of vm2 for versions up to 3.9.16, allowing attackers to raise an unsanitized host exception inside `handleException()` which can be used to escape the sandbox and run arbitrary code in host context. This vulnerability was patched in the release of version `3.9.17` of `vm2`. There are no known workarounds for this vulnerability. Users are advised to upgrade.
3.9.17
Affected by 23 other vulnerabilities.
VCID-nkcm-wcbb-quhs
Aliases:
CVE-2026-22709
GHSA-99p7-6v5w-7xg8
vm2 is an open source vm/sandbox for Node.js. In vm2 prior to version 3.10.2, `Promise.prototype.then` `Promise.prototype.catch` callback sanitization can be bypassed. This allows attackers to escape the sandbox and run arbitrary code. In lib/setup-sandbox.js, the callback function of `localPromise.prototype.then` is sanitized, but `globalPromise.prototype.then` is not sanitized. The return value of async functions is `globalPromise` object. Version 3.10.2 fixes the issue.
3.10.2
Affected by 18 other vulnerabilities.
VCID-pucd-5ym9-1bc8
Aliases:
CVE-2026-24120
GHSA-qvjj-29qf-hp7p
vm2 is an open source vm/sandbox for Node.js. Prior to version 3.10.5, the fix for CVE-2023-37466 is insufficient and can be circumvented allowing 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.10.5.
3.10.5
Affected by 18 other vulnerabilities.
VCID-qsyb-rkff-wyht
Aliases:
CVE-2021-23449
GHSA-rjf2-j2r6-q8gr
3.9.4
Affected by 28 other vulnerabilities.
VCID-rm74-p6v5-wkbj
Aliases:
CVE-2023-29199
GHSA-xj72-wvfv-8985
There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15, allowing attackers to bypass `handleException()` and leak unsanitized host exceptions which can be used to escape the sandbox and run arbitrary code in host context. A threat actor can bypass the sandbox protections to gain remote code execution rights on the host running the sandbox. This vulnerability was patched in the release of version `3.9.16` of `vm2`.
3.9.16
Affected by 24 other vulnerabilities.
VCID-rt16-s8w5-8qgy
Aliases:
CVE-2026-44007
GHSA-8hg8-63c5-gwmx
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.1, when a NodeVM is created with nesting: true, sandbox code can unconditionally require('vm2') regardless of the outer VM's require configuration — including require: false. With access to vm2, the sandbox constructs a new inner NodeVM with its own unrestricted require settings and executes arbitrary OS commands on the host. Any application that runs untrusted code inside a NodeVM with nesting: true is fully compromised. This vulnerability is fixed in 3.11.1.
3.11.1
Affected by 4 other vulnerabilities.
VCID-tvb2-2e76-27av
Aliases:
GHSA-2cm2-m3w5-gp2f
vm2 has access to `VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL` ### Summary https://github.com/patriksimek/vm2/security/advisories/GHSA-wp5r-2gw5-m7q7 is not fully patched. ### Details It is still possible to get access to `VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL`. ### PoC ```js const {VM} = require("vm2"); const vm = new VM(); console.log(vm.run(` globalThis['VM2_INTERNAL_STATE_DO_NOT_USE_OR_PROGRAM_WILL_FAIL'] `)); ```
3.11.2
Affected by 1 other vulnerability.
VCID-ua6c-rrsj-2kg6
Aliases:
CVE-2023-32314
GHSA-whpj-8f3w-67p5
vm2 is a sandbox that can run untrusted code with Node's built-in modules. A sandbox escape vulnerability exists in vm2 for versions up to and including 3.9.17. It abuses an unexpected creation of a host object based on the specification of `Proxy`. As a result a threat actor can bypass the sandbox protections to gain remote code execution rights on the host running the sandbox. This vulnerability was patched in the release of version `3.9.18` of `vm2`. Users are advised to upgrade. There are no known workarounds for this vulnerability.
3.9.18
Affected by 21 other vulnerabilities.
VCID-vj51-w2rv-6qgu
Aliases:
CVE-2023-32313
GHSA-p5gc-c584-jj6v
vm2 is a sandbox that can run untrusted code with Node's built-in modules. In versions 3.9.17 and lower of vm2 it was possible to get a read-write reference to the node `inspect` method and edit options for `console.log`. As a result a threat actor can edit options for the `console.log` command. This vulnerability was patched in the release of version `3.9.18` of `vm2`. Users are advised to upgrade. Users unable to upgrade may make the `inspect` method readonly with `vm.readonly(inspect)` after creating a vm.
3.9.18
Affected by 21 other vulnerabilities.
VCID-vsvp-q6bs-3qau
Aliases:
CVE-2022-25893
GHSA-4w2j-2rg4-5mjw
3.9.10
Affected by 27 other vulnerabilities.
VCID-vwem-gghh-t7hc
Aliases:
CVE-2026-44002
GHSA-v27g-jcqj-v8rw
vm2 is an open source vm/sandbox for Node.js. Prior to 3.11.0, vm2's CallSite wrapper class (intended as a safe wrapper for V8's native CallSite) blocks getThis() and getFunction() to prevent host object leakage, but allows getFileName() to return unsanitized host absolute paths. Any sandboxed code can extract the full directory structure, library paths, and framework versions of the host server. This vulnerability is fixed in 3.11.0.
3.11.0
Affected by 5 other vulnerabilities.
VCID-w13m-snrt-5ud3
Aliases:
CVE-2023-29017
GHSA-7jxr-cg7f-gpgv
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Prior to version 3.9.15, vm2 was not properly handling host objects passed to `Error.prepareStackTrace` in case of unhandled async errors. A threat actor could bypass the sandbox protections to gain remote code execution rights on the host running the sandbox. This vulnerability was patched in the release of version 3.9.15 of vm2. There are no known workarounds.
3.9.15
Affected by 25 other vulnerabilities.
VCID-wm49-3agn-rffg
Aliases:
CVE-2023-37466
GHSA-cchq-frgv-rjh5
vm2 is an advanced vm/sandbox for Node.js. The library contains critical security issues and should not be used for production. The maintenance of the project has been discontinued. In vm2 for versions up to 3.9.19, `Promise` handler sanitization can be bypassed with the `@@species` accessor property allowing attackers to escape the sandbox and run arbitrary code, potentially allowing remote code execution inside the context of vm2 sandbox. Version 3.10.0 contains a patch for the issue.
3.10.0
Affected by 19 other vulnerabilities.
Vulnerabilities fixed by this package (0)
Vulnerability Summary Aliases
This package is not known to fix vulnerabilities.

Date Actor Action Vulnerability Source VulnerableCode Version
2026-06-13T21:01:28.704130+00:00 GitLab Importer Affected by VCID-598j-pe72-qkh3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-45411.yml 38.6.0
2026-06-12T22:25:10.243504+00:00 GitLab Importer Affected by VCID-8zk3-a7sw-u7an https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44009.yml 38.6.0
2026-06-12T22:24:48.196557+00:00 GitLab Importer Affected by VCID-tvb2-2e76-27av https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/GHSA-2cm2-m3w5-gp2f.yml 38.6.0
2026-06-12T22:24:18.718804+00:00 GitLab Importer Affected by VCID-g93v-7a6d-5bfm https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44008.yml 38.6.0
2026-06-12T22:23:46.297484+00:00 GitLab Importer Affected by VCID-rt16-s8w5-8qgy https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44007.yml 38.6.0
2026-06-12T22:23:45.917438+00:00 GitLab Importer Affected by VCID-vwem-gghh-t7hc https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44002.yml 38.6.0
2026-06-12T22:23:43.870985+00:00 GitLab Importer Affected by VCID-6fr8-3aqn-wyce https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-43997.yml 38.6.0
2026-06-12T22:23:32.856878+00:00 GitLab Importer Affected by VCID-hb4z-qz2p-rqc5 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44001.yml 38.6.0
2026-06-12T22:23:31.922274+00:00 GitLab Importer Affected by VCID-8pe8-9mh9-27f3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44003.yml 38.6.0
2026-06-12T22:23:31.223170+00:00 GitLab Importer Affected by VCID-bcct-j6mk-z7hu https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44004.yml 38.6.0
2026-06-12T22:23:23.029943+00:00 GitLab Importer Affected by VCID-77zs-22q5-d7ev https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44000.yml 38.6.0
2026-06-12T22:23:22.367488+00:00 GitLab Importer Affected by VCID-55dr-v6ew-s3e8 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-44006.yml 38.6.0
2026-06-12T22:21:25.111892+00:00 GitLab Importer Affected by VCID-pucd-5ym9-1bc8 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-24120.yml 38.6.0
2026-06-12T22:21:09.873529+00:00 GitLab Importer Affected by VCID-8he7-t256-1yct https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-24781.yml 38.6.0
2026-06-12T22:20:59.809277+00:00 GitLab Importer Affected by VCID-k9q9-7mgb-rbbf https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-26956.yml 38.6.0
2026-06-12T22:20:20.421902+00:00 GitLab Importer Affected by VCID-gvhg-db7k-57ey https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-26332.yml 38.6.0
2026-06-12T22:20:00.660845+00:00 GitLab Importer Affected by VCID-kjca-h5yw-cudv https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-24118.yml 38.6.0
2026-06-12T20:52:10.120131+00:00 GitLab Importer Affected by VCID-nkcm-wcbb-quhs https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2026-22709.yml 38.6.0
2026-06-12T19:00:25.076833+00:00 GitLab Importer Affected by VCID-wm49-3agn-rffg https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2023-37466.yml 38.6.0
2026-06-12T19:00:24.697585+00:00 GitLab Importer Affected by VCID-6n7e-fz65-jfds https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2023-37903.yml 38.6.0
2026-06-12T18:55:15.913831+00:00 GitLab Importer Affected by VCID-ua6c-rrsj-2kg6 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2023-32314.yml 38.6.0
2026-06-12T18:55:14.938184+00:00 GitLab Importer Affected by VCID-vj51-w2rv-6qgu https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2023-32313.yml 38.6.0
2026-06-12T18:52:18.689114+00:00 GitLab Importer Affected by VCID-mqs7-x7bh-17ef https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2023-30547.yml 38.6.0
2026-06-12T18:52:10.967353+00:00 GitLab Importer Affected by VCID-rm74-p6v5-wkbj https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2023-29199.yml 38.6.0
2026-06-12T18:51:39.881738+00:00 GitLab Importer Affected by VCID-w13m-snrt-5ud3 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2023-29017.yml 38.6.0
2026-06-12T18:42:34.666889+00:00 GitLab Importer Affected by VCID-vsvp-q6bs-3qau https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2022-25893.yml 38.6.0
2026-06-12T18:31:11.488244+00:00 GitLab Importer Affected by VCID-ct4r-vjm4-4qby https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2022-36067.yml 38.6.0
2026-06-12T18:27:57.785622+00:00 GitLab Importer Affected by VCID-5xbq-86wn-77c4 https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2019-10761.yml 38.6.0
2026-06-12T17:59:32.302870+00:00 GitLab Importer Affected by VCID-3srt-uk7n-xqcw https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2021-23555.yml 38.6.0
2026-06-12T17:49:33.283164+00:00 GitLab Importer Affected by VCID-qsyb-rkff-wyht https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/vm2/CVE-2021-23449.yml 38.6.0