Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

CVE-2023-37466: CWE-94: Improper Control of Generation of Code ('Code Injection') in patriksimek vm2

0
Critical
VulnerabilityCVE-2023-37466cvecve-2023-37466cwe-94
Published: Thu Jul 13 2023 (07/13/2023, 23:17:51 UTC)
Source: CVE Database V5
Vendor/Project: patriksimek
Product: vm2

Description

vm2 is an advanced vm/sandbox for Node.js. The library contains critical security issues and should not be used for production. The maintenance of the project has been discontinued. In vm2 for versions up to 3.9.19, `Promise` handler sanitization can be bypassed with the `@@species` accessor property allowing attackers to escape the sandbox and run arbitrary code, potentially allowing remote code execution inside the context of vm2 sandbox.

AI-Powered Analysis

AILast updated: 11/03/2025, 23:37:43 UTC

Technical Analysis

The vulnerability identified as CVE-2023-37466 affects the vm2 library, a popular sandboxing tool for Node.js environments designed to safely execute untrusted code. The issue stems from improper control over code generation (CWE-94), specifically a bypass of Promise handler sanitization through the @@species accessor property. This bypass allows attackers to escape the sandbox environment, which is intended to isolate and restrict code execution, and instead execute arbitrary code within the host environment. The vulnerability affects all vm2 versions up to and including 3.9.19. Since vm2 is no longer maintained, no official patches or updates are available, increasing the risk for users who continue to rely on it. The vulnerability is remotely exploitable without requiring authentication or user interaction, making it highly dangerous. The CVSS v3.1 score of 9.8 reflects the critical nature of this flaw, indicating high impact on confidentiality, integrity, and availability. The sandbox escape can lead to full system compromise, data theft, or service disruption. Although no known exploits have been reported in the wild yet, the ease of exploitation and severity warrant urgent mitigation. Organizations using vm2 in production or development environments, especially those running multi-tenant services or processing untrusted code, are at significant risk.

Potential Impact

For European organizations, the impact of CVE-2023-37466 can be severe. The vulnerability enables attackers to bypass sandbox restrictions and execute arbitrary code, potentially leading to full system compromise. This can result in data breaches, unauthorized access to sensitive information, disruption of services, and loss of trust. Organizations in sectors such as cloud computing, software development, fintech, and SaaS providers are particularly vulnerable due to their reliance on Node.js environments and sandboxing for security. The lack of maintenance for vm2 means that organizations cannot rely on vendor patches, increasing exposure time. Additionally, regulatory frameworks like GDPR impose strict data protection requirements, and exploitation of this vulnerability could lead to significant compliance violations and fines. The ability to execute code remotely without authentication or user interaction makes this vulnerability attractive to attackers aiming for widespread impact or targeted attacks on critical infrastructure and services within Europe.

Mitigation Recommendations

Given the discontinued maintenance of vm2, the primary mitigation is to remove or replace vm2 with a maintained and secure sandboxing solution. Organizations should audit their codebases and dependencies to identify usage of vm2 and plan for migration to alternatives such as Node.js's built-in vm module with strict context isolation or other third-party sandbox libraries that are actively maintained. If immediate removal is not feasible, isolating the vulnerable components in restricted environments with minimal privileges and network access can reduce risk. Implementing runtime monitoring and anomaly detection to identify suspicious behavior related to sandbox escapes is also recommended. Regularly updating all dependencies and applying security best practices for Node.js applications will help reduce attack surface. Additionally, organizations should conduct thorough code reviews and penetration testing focused on sandbox environments. Finally, educating developers about the risks of using unmaintained libraries and enforcing strict dependency management policies will prevent similar issues in the future.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2023-07-06T13:01:36.997Z
Cvss Version
3.1
State
PUBLISHED

Threat ID: 69092632fe7723195e0b5f7e

Added to database: 11/3/2025, 10:01:22 PM

Last enriched: 11/3/2025, 11:37:43 PM

Last updated: 11/6/2025, 1:15:06 PM

Views: 3

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats