Critical Remote Code Execution Vulnerability in vm2 Package

vm2 Updated 06 Oct 2026

Summary

17/09/2026
CRITICAL
No i
Critical
10.0

GHSA-29x6-9qh5-83gg: Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-j3hm-6rg5-mchv. 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

The vm2 package is a popular Node.js library that provides a sandboxed environment for executing untrusted JavaScript code. It allows developers to run code securely by isolating it from the host environment. However, a significant vulnerability has been identified that can lead to unrestricted access to the host filesystem and remote code execution (RCE) when specific configurations are not properly set.

Vulnerability Detail

The vulnerability arises from the use of the require.external feature in vm2 without an explicit require.root setting that excludes node_modules. This misconfiguration allows sandboxed code to require the vm2 package itself, instantiate an unrestricted NodeVM instance, and execute arbitrary commands on the host operating system using child_process. The potential ramifications include unauthorized access to sensitive data, system compromise, and complete control over the affected server.

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 require.external without setting require.root to a safe directory. Ensure that your configuration explicitly restricts access to sensitive directories, such as node_modules, to mitigate the risk of exploitation.

Conclusion

The vm2 package has a critical vulnerability that allows remote code execution when misconfigured. It is crucial to update to the patched version 3.11.7 or later and to implement workarounds to mitigate risks until an update can be applied. Regular monitoring with tools like Vulert can help maintain security in your applications.

See every vulnerability recorded for vm2 →

Share this vulnerability

FAQ

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

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By analyzing your package-lock.json file, Vulert can provide real-time alerts. You can also check your application using the Vulert playground without any signup.

Failure to address this vulnerability can lead to unauthorized access to the host filesystem, data breaches, and complete control over the affected server, posing significant security risks.

Yes, you should upgrade to version 3.11.7 or later to ensure that the vulnerability is patched.

If immediate updates are not possible, implement the recommended workaround by configuring require.root to restrict access to sensitive directories and avoid using require.external.

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