CVE-2026-92951: vm2 Package Allows Bypass of External Package Allowlist via Colliding Host Package

vm2 Updated 01 Oct 2026

Summary

01/10/2026
Yes i
Critical
9.9

CVE-2026-92951: vm2 is a sandbox library for isolating and executing untrusted JavaScript code inside a Node.js process. Affects vm2 versions < 3.11.7. Fixed in 3.11.7. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

vm2 is a popular sandbox library designed for executing untrusted JavaScript code within a Node.js environment. It provides a secure way to isolate code execution by restricting access to built-in modules and external packages. However, the library's configuration options, particularly regarding external package management, can introduce vulnerabilities if not properly managed.

Vulnerability Detail

The vulnerability arises from the way vm2 handles the external package allowlist when a custom module resolver is used. Specifically, the allowlist check is performed using a non-exact substring match, which allows an attacker to bypass the intended restrictions. For instance, if 'left-pad' is the only allowed package, an attacker could exploit this by using a package named 'evil-left-pad', which contains the allowed substring. This could lead to unauthorized code execution in the host context, potentially allowing the attacker to access sensitive information or disrupt services.

How To Fix

Latest published version: 3.12.2 as of 22 Oct 2026

npm install vm2@3.12.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.11.7

This is the first release that contains the fix.

npm install vm2@3.11.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using custom resolvers with the external allowlist feature in vm2 until the package is updated. If you must use a custom resolver, ensure that it only points to trusted directories that cannot be influenced by untrusted users.

Conclusion

The vm2 package has a critical vulnerability that allows attackers to bypass the external package allowlist through colliding package names. It is essential to update to the patched version to mitigate this risk. Additionally, users should be aware of the potential impacts and consider workarounds if an immediate update is not feasible.

See every vulnerability recorded for vm2 →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 9.9, indicating a critical level of severity.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.

An attacker could execute unauthorized code in the host context, potentially accessing sensitive data, modifying files, or disrupting services.

Yes, this vulnerability affects vm2 versions up to and including 3.11.6. It is fixed in version 3.11.7 and later.

If an immediate update is not possible, consider implementing workarounds such as avoiding custom resolvers or restricting access to trusted directories.

Related vulnerabilities

Recent vulnerabilities recorded for vm2.

How To Fix

Latest published version: 3.12.2 as of 22 Oct 2026

npm install vm2@3.12.2

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

3.11.7

This is the first release that contains the fix.

npm install vm2@3.11.7

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback