CVE-2023-29017 vm2 Sandbox Escape vulnerability

Critical 10.0 Published Updated

Attackers can bypass sandbox protections to execute arbitrary code on the host via improper handling of async errors in vm2.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2023-29017?

CVE-2023-29017 is a critical code injection vulnerability in patriksimek vm2, published on 6 Apr 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. Prior to version 3.9.15, vm2 was not properly handling host objects passed to `Error.prepareStackTrace` in case of unhandled async errors. A threat actor could bypass the sandbox protections to gain remote code execution rights on the host running the sandbox. This vulnerability was patched in the release of version 3.9.15 of vm2. There are no known workarounds.

Weakness: CWE-913

Which versions are affected by CVE-2023-29017?

2 open source packages ship an affected version, including vm2. It affects 1 product.

PackageAffectedFixed in
vm2 npmAll versions3.9.15
vm2 npmAll versions3.9.15

Products include Vm2 Project Vm2.

How do I fix CVE-2023-29017?

Upgrade vm2 to 3.9.15 or later.

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2023-29017 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-29017 exists.

Public exploit code: 3 proofs of concept on GitHub.

Sources

Also known as GHSA-7jxr-cg7f-gpgv, ROOT-APP-NPM-CVE-2023-29017.

Is CVE-2023-29017 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free