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

vm2 sandbox escape via Error.prepareStackTrace host object handling

IdentifiersCVE-2023-29017CWE-693

CVE-2023-29017 is a critical sandbox-escape vulnerability in the vm2 Node.js library prior to version 3.9.15. vm2 is intended to execute untrusted JavaScript in a restricted context with controlled access to Node.js built-in modules. The flaw is caused by improper handling of host objects passed to Error.prepareStackTrace when unhandled asynchronous errors occur. Because these host objects are not safely contained within the sandbox boundary, an attacker running untrusted code inside vm2 can abuse this condition to break out of the sandbox and execute arbitrary code in the host context.

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 bypass vm2 sandbox protections and achieve remote code execution on the host running the sandbox. This can result in full compromise of the application process hosting vm2, including execution of arbitrary system commands, access to host resources available to that process, theft or modification of sensitive data, and potential follow-on compromise depending on the host's privileges and environment.

Mitigation

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

No known workarounds are available according to the provided content. If immediate upgrade is not possible, the only practical risk-reduction measure is to avoid using vulnerable vm2 versions to execute untrusted code and to place the sandboxed workload behind stronger isolation boundaries external to vm2.

Remediation

Patch, then assume compromise.

Upgrade vm2 to version 3.9.15 or later. The vulnerability was patched in vm2 3.9.15 according to the provided content.
PUBLIC EXPLOITS

Exploits

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

VALID 1 / 1 TOTALView more in app
seongil-wi-CVE-2023-29017MaturityPoCVerified exploit

This repository contains two JavaScript proof-of-concept exploits targeting the vm2 sandbox library (version 3.9.14) for Node.js. Both files, 'vm2_3.9.14_exploit_1.js' and 'vm2_3.9.14_exploit_2.js', demonstrate a sandbox escape by abusing the Error object's stack trace preparation mechanism. The exploit leverages JavaScript's dynamic function construction to access the Node.js 'process' object and execute arbitrary system commands via 'child_process.execSync'. The payload in both files attempts to create a file named 'flag' on the host system, proving code execution outside the intended sandbox. The repository is structured as two minimal, standalone exploit scripts, each providing a slightly different approach to trigger the vulnerability. No network endpoints or external services are targeted; the exploit is purely local and demonstrates the risk of running untrusted code in a vulnerable vm2 environment.

timb-machine-mirrorsDisclosed Apr 7, 2023javascriptlocal
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.