Description
vm2 is a sandbox that can run untrusted code with whitelisted Node's built-in modules. There exists a vulnerability in exception sanitization of vm2 for versions up to 3.9.16, allowing attackers to raise an unsanitized host exception inside `handleException()` which can be used to escape the sandbox and run arbitrary code in host context. This vulnerability was patched in the release of version `3.9.17` of `vm2`. There are no known workarounds for this vulnerability. Users are advised to upgrade.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| patriksimek | vm2 | < 3.9.17 | — |
Public exploits
Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.
GitHub 5 repositories
-
rvzsec/CVE-2023-30547 ★ 44 · Dec 10, 2023
PoC Exploit for VM2 Sandbox Escape Vulnerability
-
Cur1iosity/CVE-2023-30547 ★ 1 · Feb 14, 2024
Tool for exploring CVE-2023-30547
-
R3fr4kt/Codify-TJNULL-OSCP- ★ 0 · Aug 3, 2026
Walkthrough for Codify (Linux - Easy). Exploits vm2 RCE (CVE-2023-30547), SQLite DB hash extraction, Bcrypt cracking with John, and Privilege Escalation via Bash wildcard comparison in `mysql-backup.…
-
junnythemarksman/CVE-2023-30547 ★ 0 · Jun 4, 2024
-
user0x1337/CVE-2023-30547 ★ 0 · Feb 8, 2024
PoC to CVE-2023-30547 (Library vm2)
Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| npm | vm2 | < 3.9.17 | 3.9.17 | GHSA-ch3r-j5x3-6q2m |
Advisories 1
- WID-SEC-2023-1004 vm2: Mehrere Schwachstellen BSI CERT-Bund (WID) · Apr 19, 2023
References
- https://github.com/patriksimek/vm2/security/advisories/GHSA-ch3r-j5x3-6q2m
- https://github.com/patriksimek/vm2/commit/4b22e87b102d97d45d112a0931dba1aef7eea049
- https://github.com/patriksimek/vm2/commit/f3db4dee4d76b19869df05ba7880d638a880edd5
- https://gist.github.com/leesh3288/381b230b04936dd4d74aaf90cc8bb244