CVE-2026-92945: vm2 External Module Allowlist Bypass Vulnerability

vm2 Updated 01 Oct 2026

Summary

01/10/2026
Yes i
Moderate
4.2

CVE-2026-92945: isPathAllowedForModule decides whether a resolved path belongs to an allowlisted external module using a raw string prefix test. 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 Node.js package that provides a sandboxed environment for executing untrusted code securely. It allows developers to run scripts in a controlled manner, preventing unauthorized access to the host environment. However, a recent vulnerability has been identified that affects the external module allowlist feature, potentially allowing unauthorized access to sibling packages.

Vulnerability Detail

The vulnerability arises from the function 'isPathAllowedForModule' in the vm2 package, which uses a raw string prefix test to determine if a resolved path belongs to an allowlisted external module. This means that if a package shares a prefix with an allowlisted package, it may be incorrectly treated as allowlisted. As a result, code running in NodeVM under an external module allowlist with transitive loading disabled can access packages that were not explicitly allowlisted, provided that an allowlisted package performs a relative require to a prefix-sharing sibling. This could lead to unauthorized code execution and potential security breaches.

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, you can modify the 'isPathAllowedForModule' function in the 'lib/resolver-compat.js' file to require a separator after the prefix. Change the line: 'if (path.startsWith(mod.path))' to 'if (path === mod.path || path.startsWith(mod.path + path.sep))'. This adjustment will prevent sibling packages from being incorrectly treated as allowlisted.

Conclusion

The CVE-2026-92945 vulnerability in the vm2 package poses a significant risk by allowing unauthorized access to sibling packages through improper handling of the external module allowlist. It is crucial to update to version 3.11.7 or later to mitigate this risk. Additionally, using tools like Vulert can help monitor and alert for such vulnerabilities in your applications.

See every vulnerability recorded for vm2 →

Share this vulnerability

FAQ

CVE-2026-92945 is a vulnerability in the vm2 package that allows unauthorized access to sibling packages due to improper handling of the external module allowlist.

If your application uses vm2 with an external module allowlist, this vulnerability could allow untrusted code to access packages that should not be accessible, leading to potential security risks.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. By analyzing your package-lock.json file, Vulert can help you determine if your application is affected by this vulnerability.

If you cannot update the package right away, consider applying the suggested workaround to mitigate the risk until you can perform the update.

The CVSS score of this vulnerability is 4.2, indicating a moderate level of risk associated with its exploitation.

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