CVE-2026-92946: vm2 Critical RCE Vulnerability via Unrestricted Host Filesystem Access

vm2 Updated 06 Oct 2026

Summary

05/10/2026
Yes i
Critical
10.0

CVE-2026-92946: NodeVM's require.external option lets sandboxed code require() local files and npm packages. 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 Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

vm2 is a popular Node.js library that provides a sandboxed environment for executing untrusted code. It allows developers to run JavaScript code in a secure context, isolating it from the host environment. This is particularly useful for applications that need to execute user-generated scripts without exposing the underlying system to potential harm. However, a critical vulnerability has been identified in vm2 that can lead to remote code execution (RCE) if not properly configured.

Vulnerability Detail

The vulnerability arises from the NodeVM's require.external option, which allows sandboxed code to require local files and npm packages. If require.external is enabled without explicitly setting require.root to a safe path, it defaults to unrestricted access. This means that sandboxed code can load and execute arbitrary files from the host filesystem, including the vm2 package itself, leading to full RCE. The issue is exacerbated by the default context being set to 'host', allowing the use of the real Node.js require() function, which bypasses any sandbox restrictions.

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

If you cannot update to the patched version immediately, a temporary workaround is to disable the require.external option entirely or set require.root to a directory that excludes node_modules. For example:

const { NodeVM } = require('vm2');
const vm = new NodeVM({
  require: {
    external: false,
    root: './safe-directory',
  },
});

Conclusion

The vm2 package has a critical vulnerability that allows unrestricted host filesystem access and full remote code execution if not properly configured. It is essential to update to the latest version and follow best practices to secure your application against this threat.

See every vulnerability recorded for vm2 →

Share this vulnerability

FAQ

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

You can use Vulert to monitor and alert in real-time for open-source vulnerabilities. Visit Vulert Scanner to check if your application is affected without requiring any signup.

If left unaddressed, this vulnerability allows attackers to execute arbitrary commands on the host system, potentially leading to data breaches or system compromise.

Yes, ensure that require.root is explicitly set to a path that does not include node_modules when using require.external.

The impact includes the ability for untrusted code to execute arbitrary OS commands and access sensitive files, effectively bypassing all sandbox restrictions.

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