The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2023-32313

CVE-2023-32313: Vm2_project Vm2 RCE Vulnerability

CVE-2023-32313 is a remote code execution vulnerability in Vm2_project Vm2 that allows attackers to manipulate Node inspect methods and console.log options. This article covers technical details, affected versions, and mitigation.

Published: February 4, 2026

CVE-2023-32313 Overview

CVE-2023-32313 is a sandbox escape vulnerability in vm2, a popular Node.js library designed to run untrusted code safely within isolated sandboxes. In versions 3.9.17 and lower, attackers can obtain a read-write reference to the Node.js inspect method, enabling them to modify options for console.log and potentially bypass sandbox restrictions.

Critical Impact

Threat actors can edit options for the console.log command by gaining unauthorized read-write access to the inspect method, potentially compromising the integrity of sandbox isolation.

Affected Products

  • vm2_project vm2 versions 3.9.17 and lower
  • Node.js applications utilizing vm2 for sandbox execution
  • Any system running untrusted code through vulnerable vm2 instances

Discovery Timeline

  • 2023-05-15 - CVE-2023-32313 published to NVD
  • 2024-11-21 - Last updated in NVD database

Technical Details for CVE-2023-32313

Vulnerability Analysis

This vulnerability allows attackers to break out of the vm2 sandbox's intended isolation by obtaining write access to the inspect method from Node.js's util module. The sandbox is designed to prevent untrusted code from accessing or modifying host environment objects, but this flaw creates a pathway for unauthorized manipulation of console output options.

The root issue stems from insufficient protection of the inspect method reference within the sandbox context. When an attacker obtains write access to this method, they can alter how objects are represented in console output, which may lead to further exploitation vectors or information disclosure scenarios.

Root Cause

The vulnerability exists because the vm2 sandbox did not enforce read-only access to the inspect method from the util module. This oversight allowed sandboxed code to obtain a mutable reference to this internal method, breaking the principle of least privilege that sandboxes are designed to enforce.

The CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component) classification indicates that the vulnerability involves injection-related weaknesses where the sandbox fails to properly neutralize access to sensitive internal components.

Attack Vector

The attack vector is network-based, requiring no user interaction or special privileges. An attacker can craft malicious code that, when executed within the vm2 sandbox, gains write access to the inspect method and subsequently modifies console.log options. This represents an integrity compromise of the sandbox environment.

javascript
// Security patch in lib/vm.js - Inspect method should be readonly
// Source: https://github.com/patriksimek/vm2/commit/5206ba25afd86ef547a2c9d48d46ca7a9e6ec238

 const {
 	VMScript
 } = require('./script');
+const {
+	inspect
+} = require('util');
 
 const objectDefineProperties = Object.defineProperties;

Source: GitHub Commit Changes

The patch imports the inspect method directly from the util module at the top level, ensuring it can be properly controlled and made read-only within the sandbox context.

Detection Methods for CVE-2023-32313

Indicators of Compromise

  • Unusual modifications to console.log output formatting or behavior in sandbox environments
  • Evidence of sandboxed code attempting to access the util.inspect method with write permissions
  • Unexpected object inspection behavior in vm2-protected code execution environments

Detection Strategies

  • Monitor for npm package version checks revealing vm2 versions 3.9.17 or below
  • Implement runtime monitoring for unauthorized access attempts to Node.js internal methods from sandboxed contexts
  • Review application logs for abnormal console output patterns that may indicate inspect method manipulation

Monitoring Recommendations

  • Enable verbose logging for vm2 sandbox operations to track method access patterns
  • Implement dependency scanning in CI/CD pipelines to identify vulnerable vm2 versions
  • Set up alerts for any sandbox escape attempts or privilege escalation events in Node.js applications

How to Mitigate CVE-2023-32313

Immediate Actions Required

  • Upgrade vm2 to version 3.9.18 or later immediately
  • Audit all Node.js applications using vm2 for affected versions
  • If immediate upgrade is not possible, implement the workaround by making the inspect method read-only
  • Review any code that has been executed through vulnerable vm2 instances for potential compromise

Patch Information

The vulnerability was addressed in vm2 version 3.9.18. Users should upgrade to this version or later to receive the security fix. The patch ensures that the inspect method is properly imported and can be made read-only within the sandbox context.

For detailed information about the fix, refer to the GitHub Security Advisory and the release notes for version 3.9.18.

Workarounds

  • Apply vm.readonly(inspect) after creating a vm instance to make the inspect method read-only
  • Consider restricting network access to systems running vulnerable vm2 instances until patched
  • Implement additional input validation for any code being passed to the vm2 sandbox
bash
# Configuration example
# Upgrade vm2 to the patched version
npm update vm2@3.9.18

# Or install the specific patched version
npm install vm2@3.9.18 --save

# Verify the installed version
npm list vm2

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechVm2

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.50%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-74

  • NVD-CWE-noinfo
  • Technical References
  • Gist GitHub PoC

  • GitHub Release 3.9.18
  • Vendor Resources
  • GitHub Commit Changes

  • GitHub Security Advisory
  • Related CVEs
  • CVE-2026-22709: vm2 Node.js Sandbox RCE Vulnerability

  • CVE-2023-37466: Vm2_project Vm2 RCE Vulnerability

  • CVE-2023-37903: Vm2 Sandbox Escape RCE Vulnerability

  • CVE-2022-25893: Vm2_project Vm2 RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English