Critical Authorization Bypass in vm2 Package: External Package Allowlist Vulnerability

vm2 Updated 01 Oct 2026

Summary

17/09/2026
CRITICAL
No i
Critical
9.9

GHSA-6fvh-fgmg-3x7v: Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-c48m-32m9-vx93. Affects vm2 versions < 3.11.6. No fix is published. 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 JavaScript code in a controlled context, preventing unauthorized access to the host environment. However, a vulnerability has been identified in the package's external package allowlist feature, which could lead to unauthorized code execution.

Vulnerability Detail

The vulnerability in vm2 arises from an incorrect authorization check in the external package allowlist. Instead of performing exact substring matching, the allowlist check uses non-exact matching, allowing attackers to bypass the restrictions by requiring a colliding package name that contains an allowlisted package substring. This could result in the execution of unauthorized host packages in the host context, leading to severe security implications, including data breaches and system compromise.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, avoid using package names that could collide with allowlisted packages. Additionally, review your code to ensure that no untrusted input can influence the package names being required.

Conclusion

The vm2 package has a critical vulnerability that allows attackers to bypass the external package allowlist, potentially leading to unauthorized code execution. It is essential to update to version 3.11.7 or later to mitigate this risk. Utilizing tools like Vulert can help monitor and alert for such vulnerabilities in real-time.

See every vulnerability recorded for vm2 →

Share this vulnerability

FAQ

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

You can use Vulert, which monitors and alerts for open-source vulnerabilities in your software. Simply upload your package-lock.json file to the Vulert playground at Vulert Scanner to check for vulnerabilities without any signup.

If exploited, this vulnerability could allow attackers to execute unauthorized code in the host environment, potentially leading to data breaches, system compromise, and other severe security issues.

Yes, the vulnerability is fixed in vm2 version 3.11.7 and later. It is crucial to update to this version to mitigate the risk.

If an immediate update is not possible, review your code for any potential package name collisions and avoid using untrusted input that could influence package loading.

Related vulnerabilities

Recent vulnerabilities recorded for vm2.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. 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