CVE-2023-32314

9.8 CRITICAL

📋 TL;DR

CVE-2023-32314 is a critical sandbox escape vulnerability in vm2 that allows attackers to bypass sandbox protections and execute arbitrary code on the host system. It affects all vm2 users running untrusted code in sandboxed environments up to version 3.9.17. This vulnerability enables complete compromise of the host running the vulnerable vm2 instance.

💻 Affected Systems

Products:
  • vm2
Versions: All versions up to and including 3.9.17
Operating Systems: All operating systems running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using vm2 to execute untrusted JavaScript code is vulnerable regardless of configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete host takeover with remote code execution, allowing attackers to install malware, steal data, pivot to other systems, or establish persistent access.

🟠

Likely Case

Remote code execution leading to data exfiltration, cryptocurrency mining, or ransomware deployment on vulnerable systems.

🟢

If Mitigated

Limited impact if vm2 is isolated in containerized environments with strict network policies and minimal host permissions.

🌐 Internet-Facing: HIGH - Any internet-facing application using vulnerable vm2 versions can be exploited remotely without authentication.
🏢 Internal Only: HIGH - Internal applications processing untrusted code or user inputs via vm2 remain vulnerable to exploitation.

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: CONFIRMED
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Multiple proof-of-concept exploits are publicly available, making exploitation trivial for attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 3.9.18

Vendor Advisory: https://github.com/patriksimek/vm2/security/advisories/GHSA-whpj-8f3w-67p5

Restart Required: Yes

Instructions:

1. Update package.json to specify vm2 version 3.9.18 or higher. 2. Run 'npm update vm2' or 'yarn upgrade vm2'. 3. Restart all Node.js applications using vm2. 4. Test that sandbox functionality still works as expected.

🔧 Temporary Workarounds

No workarounds available

all

The vendor has stated there are no known workarounds for this vulnerability.

🧯 If You Can't Patch

  • Immediately isolate affected systems from network access and production environments
  • Implement strict network segmentation and monitor for suspicious process creation or network connections

🔍 How to Verify

Check if Vulnerable:

Check package.json or run 'npm list vm2' to see installed version. If version is 3.9.17 or lower, the system is vulnerable.

Check Version:

npm list vm2 | grep vm2

Verify Fix Applied:

After updating, verify vm2 version is 3.9.18 or higher using 'npm list vm2' or checking package-lock.json.

📡 Detection & Monitoring

Log Indicators:

  • Unusual process spawns from Node.js applications
  • Suspicious file system access patterns
  • Unexpected network connections from Node.js processes

Network Indicators:

  • Outbound connections to suspicious IPs from Node.js processes
  • Unusual DNS queries from application servers

SIEM Query:

process_name:node.exe AND (process_command_line:*vm2* OR parent_process_name:node.exe) AND (event_type:process_create OR event_type:network_connection)

🔗 References

📤 Share & Export