CVE-2023-37903 Sandbox Escape in vm2
Attackers can escape the vm2 sandbox and execute arbitrary code via Node.js custom inspect functions, requiring users to migrate to alternative solutions.
- 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-37903?
CVE-2023-37903 is a critical code injection vulnerability in patriksimek vm2, published on 21 Jul 2023. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
vm2 is an open source vm/sandbox for Node.js. In vm2 for versions up to and including 3.9.19, Node.js custom inspect function allows attackers to escape the sandbox and run arbitrary code. This may result in Remote Code Execution, assuming the attacker has arbitrary code execution primitive inside the context of vm2 sandbox. There are no patches and no known workarounds. Users are advised to find an alternative software.
Weakness: CWE-78
Which versions are affected by CVE-2023-37903?
2 open source packages ship an affected version, including vm2. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
vm2 npm | All versions to 3.9.19 | None |
vm2 npm | All versions to 3.9.19 | None |
Products include Vm2 Project Vm2.
How do I fix CVE-2023-37903?
Product is end of life, replace it.
Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.
Is CVE-2023-37903 being exploited?
There is no known exploitation of CVE-2023-37903 in the wild and no public exploit code.
Public exploit code: 1 proofs of concept on GitHub.
Other vulnerabilities in patriksimek vm2
Sources
Also known as GHSA-g644-9gfx-q4q4, ROOT-APP-NPM-CVE-2023-37903.