CVE-2023-32314 Sandbox Escape

Critical 9.8 Published Updated

Attackers can escape the vm2 sandbox to execute arbitrary code on the host system by exploiting a Proxy specification flaw.

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-32314?

CVE-2023-32314 is a critical code injection vulnerability in patriksimek vm2, published on 15 May 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 Node's built-in modules. A sandbox escape vulnerability exists in vm2 for versions up to and including 3.9.17. It abuses an unexpected creation of a host object based on the specification of `Proxy`. As a result a threat actor can 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.18` of `vm2`. Users are advised to upgrade. There are no known workarounds for this vulnerability.

Weakness: CWE-74

Which versions are affected by CVE-2023-32314?

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

PackageAffectedFixed in
vm2 npmAll versions3.9.18
vm2 npmAll versions3.9.18

Products include Vm2 Project Vm2.

How do I fix CVE-2023-32314?

Upgrade vm2 to 3.9.18 or later.

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

Is CVE-2023-32314 being exploited?

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

Public exploit code: 1 proofs of concept on GitHub.

Sources

Also known as GHSA-whpj-8f3w-67p5, ROOT-APP-NPM-CVE-2023-32314.

Is CVE-2023-32314 in your software?

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

Check your SBOMs for free