Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
CriticalPublic exploit

Sandbox Escape in vm2 Exception Sanitization

IdentifiersCVE-2023-30547CWE-265

CVE-2023-30547 is a critical sandbox-escape vulnerability in the vm2 Node.js library affecting versions up to and including 3.9.16. vm2 is intended to execute untrusted JavaScript in a restricted context with whitelisted built-in Node.js modules. The flaw is in exception sanitization: an attacker can cause an unsanitized host exception to be raised inside handleException(), allowing host-side objects or execution context to cross the sandbox boundary. This breaks vm2’s isolation guarantees and enables arbitrary code execution in the host context. The issue was reported by SeungHyun Lee and fixed in vm2 3.9.17.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows a threat actor to escape the vm2 sandbox and execute arbitrary code in the context of the host process running vm2. In practice, this can lead to full compromise of the application component embedding vm2, including execution of system commands, access to host resources available to the process, theft or modification of sensitive data, service disruption, and potential follow-on lateral movement depending on the privileges of the hosting process.

Mitigation

If you can’t patch tonight, do this now.

No known workaround is available according to the provided content. If immediate upgrade is not possible, the only practical risk-reduction measures are to stop executing untrusted code with affected vm2 versions, isolate the hosting service with strong OS/container boundaries, and minimize privileges of the process running vm2. These are mitigations only and do not fix the underlying flaw.

Remediation

Patch, then assume compromise.

Upgrade vm2 to version 3.9.17 or later. The provided content states the vulnerability was patched in 3.9.17. Because vm2 has had multiple sandbox-escape issues, upgrading to the latest maintained release beyond the minimum fixed version is advisable where feasible.
PUBLIC EXPLOITS

Exploits

1 valid exploit after Mallory filtered fakes, detection scripts, and README-only repos.

VALID 1 / 1 TOTALView more in app
CVE-2023-30547MaturityPoCVerified exploit

This repository contains a proof-of-concept exploit for CVE-2023-30547, a sandbox escape vulnerability in vm2 (<3.9.17) for Node.js. The exploit is implemented in 'exploit.py', a Python script that provides an interactive shell interface. The user supplies the URL of a target service running a vulnerable vm2 sandbox. The script encodes a malicious JavaScript payload (which exploits the exception sanitization flaw to escape the sandbox and execute arbitrary system commands) in base64 and sends it as a JSON payload to the target via HTTP POST. The exploit expects the target to accept a JSON object with a 'code' field and to execute the provided code in the vm2 sandbox. The README provides background, usage instructions, and references. The repository is structured simply, with a single exploit script and a README. No hardcoded endpoints are present; the user must specify the target URL at runtime.

rvizxDisclosed Dec 10, 2023pythonnetwork
EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Vm2 ProjectVm2application

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity

Community discussion across Reddit, Mastodon, and other social sources.