Listen to this Post

A Dangerous Week for Node.js Security
A major security crisis has hit the Node.js ecosystem after researchers uncovered multiple critical vulnerabilities in vm2, one of the most trusted sandboxing libraries used to run untrusted JavaScript code safely. The flaws completely undermine vm2’s core promise of isolation, allowing attackers to escape the sandbox and execute arbitrary commands directly on the host machine.
Security researchers and developers are now warning that any platform relying on vm2 for code isolation may already be at risk. The situation became even more alarming after maintainers released eleven separate security advisories within just a few days, all carrying Critical severity scores. While patches have been issued for most of the vulnerabilities, two dangerous flaws still remain without fixes at the time of disclosure.
vm2 has long been popular among developers because it enables execution of third-party JavaScript inside supposedly secure environments. It is widely deployed in plugin ecosystems, multi-tenant SaaS platforms, online IDEs, CI/CD pipelines, automation systems, and cloud services. However, this latest wave of discoveries suggests that the architecture behind vm2 may be fundamentally difficult to secure.
The Security Promise That Failed
The central idea behind vm2 was simple. Developers could execute untrusted code inside isolated environments using methods like VM.run() or NodeVM.run() without worrying that the code could interact with the underlying operating system.
That promise has now collapsed.
Researchers discovered that attackers can repeatedly abuse weaknesses in vm2’s internal “bridge” system, which manages object references between the sandboxed environment and the real host JavaScript context. By manipulating JavaScript internals and special runtime behaviors, malicious scripts can obtain access to sensitive host objects such as Function.prototype.
Once that access is achieved, attackers can generate new functions that execute outside the sandbox entirely. From there, they can invoke dangerous Node.js functionality including child_process.execSync() and run system-level commands freely.
Multiple Attack Techniques Were Identified
The vulnerabilities are not based on a single coding mistake. Instead, researchers found numerous ways to abuse JavaScript primitives and advanced runtime behaviors to bypass vm2 protections.
Several attacks rely on manipulating features such as lookupGetter, Buffer.apply, util.inspect, Promise species handling, SuppressedError, and even WebAssembly internals.
One of the most technically concerning issues is CVE-2026-26956. This vulnerability specifically targets Node.js v25 environments using WebAssembly JSTag exception handling. Attackers can intentionally trigger a Symbol-to-string TypeError, intercept it using WebAssembly’s try_table instruction, and obtain a host-realm error object that bypasses vm2’s JavaScript-layer protections completely.
The result is direct exposure of host-level execution capabilities.
Allowlist Protections Were Also Broken
Another critical issue, CVE-2026-43999, exposed a dangerous flaw in NodeVM’s builtin allowlist mechanism.
Many developers configured vm2 using a pattern like:
JavaScript
builtin: [, -child_process]
The assumption was that every module would be allowed except the dangerous child_process module. However, researchers discovered that the module builtin was still silently included.
Attackers could then abuse Module._load() to load any restricted module anyway, including child_process, completely bypassing the intended security controls.
This effectively rendered many vm2 security configurations meaningless.
Nested Sandboxes Introduced Another Escape Route
Researchers also uncovered CVE-2026-44007, which affects applications using the nesting: true option.
This vulnerability allows a malicious script running inside a sandbox to import vm2 itself, create a new unrestricted inner NodeVM instance, and gain unrestricted built-in access. Once achieved, attackers can fully escape the original sandbox and execute arbitrary commands on the host system.
The issue demonstrates how even optional convenience features in sandboxing software can become catastrophic attack surfaces when isolation boundaries fail.
Two Critical Vulnerabilities Remain Unpatched
Although maintainers released vm2 versions 3.11.0 and 3.11.1 to address most disclosed issues, two critical vulnerabilities remain unresolved:
CVE-2026-44008
CVE-2026-44009
Both vulnerabilities affect all versions up to and including 3.11.1, meaning even fully updated systems may still remain vulnerable.
This has placed organizations in a difficult position. While upgrading reduces exposure to many known exploits, it does not fully eliminate risk.
Security experts are urging teams to assume that any externally accessible vm2 deployment should be treated as critically exposed until further mitigations become available.
Complete List of Disclosed Vulnerabilities
The disclosed vulnerabilities include:
CVE-2026-24118
CVE-2026-24120
CVE-2026-24781
CVE-2026-26332
CVE-2026-26956
CVE-2026-43997
CVE-2026-43999
CVE-2026-44005
CVE-2026-44006
CVE-2026-44007
CVE-2026-44008
CVE-2026-44009
Every disclosed issue received a Critical CVSS v3.1 severity score, highlighting the seriousness of the situation.
Proof-of-concept exploit code has also been publicly demonstrated for several vulnerabilities, increasing the likelihood of real-world attacks.
What Undercode Say:
vm2’s Design May Be Fundamentally Unsafe
The repeated discovery of sandbox escape vulnerabilities across nearly every vm2 release suggests a deeper architectural problem rather than isolated coding bugs.
JavaScript itself was never originally designed as a hardened security boundary. vm2 attempts to create isolation using runtime tricks, object wrapping, and interception layers inside the same process space. That strategy becomes increasingly fragile as JavaScript engines evolve.
Modern JavaScript runtimes like V8 continuously introduce new APIs, optimizations, exception models, and internal object behaviors. Every new language feature can unintentionally create another bridge between the sandbox and the host environment.
This is exactly what researchers are exploiting.
Shared Process Isolation Is Extremely Difficult
One of the biggest lessons from this incident is that in-process sandboxing remains incredibly risky for hostile workloads.
If untrusted code runs inside the same runtime process as sensitive application logic, even tiny mistakes can expose the entire system. Once attackers gain access to host-realm objects, sandbox boundaries disappear instantly.
This problem is not unique to vm2. Similar sandbox escape issues have affected browser engines, plugin systems, virtualization tools, and scripting platforms for years.
The difference is that vm2 became deeply integrated into production infrastructure across thousands of applications.
Supply Chain Exposure Could Be Massive
Because vm2 is distributed through npm and widely embedded into developer tools, many organizations may not even realize they are using it indirectly.
Cloud automation systems, online coding environments, chatbot frameworks, plugin architectures, and SaaS customization engines often rely on vm2 under the hood.
That means the attack surface extends far beyond developers who intentionally installed the package.
A vulnerable dependency buried deep inside the software supply chain could still expose entire environments to remote code execution.
WebAssembly Exploitation Is Becoming More Important
The WebAssembly-related vulnerability is especially important because it demonstrates how attackers increasingly target interactions between JavaScript and lower-level runtime internals.
WebAssembly is designed for performance and close integration with native execution behavior. That also means mistakes in exception handling or runtime translation layers can become powerful security primitives.
Security teams will likely begin auditing WebAssembly integrations far more aggressively after these disclosures.
Sandboxing Should Move Toward Stronger Isolation
Many experts now recommend moving away from in-process JavaScript sandboxes entirely.
Alternatives such as isolated-vm, lightweight containers, microVMs, and permission-based runtimes like Deno provide stronger security boundaries because they rely more heavily on process isolation or explicit permission models.
No sandbox is perfectly secure, but stronger separation layers significantly reduce the blast radius of exploitation.
Developers Need Better Threat Modeling
One reason vm2 became so popular is that developers often viewed sandboxing as a solved problem.
In reality, executing untrusted code safely remains one of the hardest challenges in software engineering.
Organizations should carefully evaluate:
Whether untrusted code execution is truly necessary
Whether isolation occurs at the process or kernel level
Whether runtime permissions are minimized
Whether exploit monitoring and containment mechanisms exist
Many systems were likely designed assuming vm2 was an absolute security boundary. That assumption is no longer safe.
Incident Response Teams Should Act Quickly
Organizations currently using vm2 should immediately:
Upgrade to version 3.11.1
Monitor for future patches
Audit applications exposing sandboxed execution
Restrict external access where possible
Review logs for suspicious sandbox activity
Evaluate migration strategies away from vm2
Given the number of public proofs-of-concept already circulating, active exploitation attempts are likely inevitable.
Fact Checker Results
✅ vm2 is a widely used Node.js sandboxing library designed for executing untrusted JavaScript code in isolated environments.
✅ Multiple CVEs with Critical severity ratings were disclosed, and two vulnerabilities remained unpatched at disclosure time.
❌ Updating to vm2 3.11.1 does not fully eliminate risk because CVE-2026-44008 and CVE-2026-44009 are still unresolved.
Prediction
🔮 More sandbox escape vulnerabilities will likely continue to appear in JavaScript-based isolation systems as runtimes become more complex.
🔮 Security-conscious organizations may increasingly migrate toward containerized or microVM-based execution instead of relying solely on in-process sandboxes.
🔮 The vm2 incident could become a major case study in software supply chain security and unsafe assumptions around JavaScript isolation technologies.
🕵️📝Let’s dive deep and fact‑check.
References:
Reported By: cyberpress.org
Extra Source Hub (Possible Sources for article):
https://www.discord.com
Wikipedia
OpenAi & Undercode AI
Image Source:
Unsplash
Undercode AI DI v2
Bing
🔐JOIN OUR CYBER WORLD [ CVE News • HackMonitor • UndercodeNews ]
📢 Follow UndercodeNews & Stay Tuned:
𝕏 formerly Twitter 🐦 | @ Threads | 🔗 Linkedin | 🦋BlueSky | 🐘Mastodon




