Critical Sandbox Escape Vulnerability in vm2 Package

vm2 Updated 06 Oct 2026

Summary

17/09/2026
CRITICAL
No i
Critical
10.0

GHSA-gg6f-mhqm-f7gp: Duplicate Advisory: Sandbox Escape (NodeVM). Affects vm2 versions < 3.11.7. 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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The vm2 package is a widely used Node.js library that provides a sandboxed environment for executing JavaScript code securely. It allows developers to run untrusted code without risking the security of the host application. However, prior to version 3.11.8, vm2 contained a critical vulnerability that could allow attackers to escape the sandbox and execute arbitrary code in the host context.

Vulnerability Detail

The vulnerability in vm2 arises from a sandbox escape in the NodeVM implementation. Attackers can exploit this flaw by accessing the host's proto getter/setter through console._stdout and console._stderr. This allows them to overwrite EventEmitter.prototype.emit, enabling the triggering of process events that can execute code with the process context. The ramifications of this vulnerability are severe, as it bypasses the intended restrictions of the sandbox, potentially leading to unauthorized access and control over the host system.

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, you can restrict the use of console._stdout and console._stderr in your application until you can update to the patched version. This can help mitigate the risk of exploitation while you prepare for the update.

Conclusion

The vm2 package has a critical vulnerability that allows for sandbox escape, potentially compromising the host system. It is essential to update to version 3.11.8 or later to mitigate this risk. Additionally, using tools like Vulert can help monitor for vulnerabilities in your applications.

See every vulnerability recorded for vm2 →

Share this vulnerability

FAQ

The vulnerability has a CVSS score of 10.0, indicating it is critical and poses a significant risk to affected systems.

You can use Vulert to monitor and alert for open-source vulnerabilities in your software. By analyzing your package-lock.json file, Vulert can identify if your application is affected by this vulnerability.

If exploited, this vulnerability could allow attackers to execute arbitrary code on the host system, leading to data breaches, unauthorized access, and potential system compromise.

Yes, you can restrict the use of console._stdout and console._stderr in your application as a temporary measure to reduce the risk of exploitation.

For more details, you can refer to the original advisory linked to this vulnerability, which provides in-depth technical information.

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