{"id":"CVE-2023-30547","published":"2023-04-17T21:42:10Z","modified":"2025-02-05T20:30:17Z","title":"Sandbox Escape in vm2","vendor":"patriksimek","product":"vm2","tier":"core","eol":null,"affectedVersions":[{"vendor":"patriksimek","product":"vm2","versions":["< 3.9.17"]}],"description":{"text":"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.","provenance":"source","from":"CVE.org"},"summary":{"text":"The vm2 sandbox library (patriksimek's vm2, versions up to 3.9.16) contains a flaw in its exception sanitization inside handleException(), which lets untrusted sandboxed code raise an unsanitized host exception. An attacker who can get untrusted code to run inside the sandbox, with no authentication or user interaction needed, can use this to escape the sandbox and execute arbitrary code in the host context.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-10-29T07:12:18Z"},"cvss":{"score":9.8,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.72973,"percentile":0.99452,"date":"2026-10-30","provenance":"source"},"kev":null,"vulncheckKev":null,"exploited":false,"otx":{"pulseCount":0,"pulses":[],"provenance":"machine"},"cwes":[{"id":"CWE-74","name":"Improper Neutralization of Special Elements in Output Used by a Downstream Component"}],"references":[{"url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-ch3r-j5x3-6q2m","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/patriksimek/vm2/commit/4b22e87b102d97d45d112a0931dba1aef7eea049","tags":["x_refsource_MISC"]},{"url":"https://github.com/patriksimek/vm2/commit/f3db4dee4d76b19869df05ba7880d638a880edd5","tags":["x_refsource_MISC"]},{"url":"https://gist.github.com/leesh3288/381b230b04936dd4d74aaf90cc8bb244","tags":["x_refsource_MISC"]}],"techniques":[],"reports":[],"affected":[{"ecosystem":"npm","package":"vm2","vulnerableRanges":["<3.9.17"],"patched":["3.9.17"],"from":["GHSA-ch3r-j5x3-6q2m"],"provenance":"source"}],"advisories":[{"id":"GHSA-ch3r-j5x3-6q2m","url":"https://github.com/advisories/GHSA-ch3r-j5x3-6q2m","severity":"CRITICAL","ecosystem":"npm","package":"vm2","vulnerableRanges":["<3.9.17"],"patched":["3.9.17"],"provenance":"source","from":"GHSA"}],"euvd":{"id":"EUVD-2023-1268","url":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2023-1268","exploited":false,"exploitedSince":null,"provenance":"source"},"exploits":[],"exploitSources":{"pocGithub":{"count":4,"skipped":1,"earliest":"2023-12-10","earliestUrl":"https://github.com/rvzsec/CVE-2023-30547","repos":[{"name":"rvzsec/CVE-2023-30547","url":"https://github.com/rvzsec/CVE-2023-30547","stars":44,"created":"2023-12-10"},{"name":"Cur1iosity/CVE-2023-30547","url":"https://github.com/Cur1iosity/CVE-2023-30547","stars":1,"created":"2024-02-14"},{"name":"user0x1337/CVE-2023-30547","url":"https://github.com/user0x1337/CVE-2023-30547","stars":0,"created":"2024-02-08"},{"name":"R3fr4kt/Codify-TJNULL-OSCP-","url":"https://github.com/R3fr4kt/Codify-TJNULL-OSCP-","stars":0,"created":"2026-08-03"}]},"first":{"date":"2023-12-10","source":"PoC-in-GitHub","url":"https://github.com/rvzsec/CVE-2023-30547"},"provenance":"source"},"exploitRefs":[],"flow":[],"timeline":[{"date":"2023-04-17","kind":"published","label":"Published (CVE.org)","url":"https://www.cve.org/CVERecord?id=CVE-2023-30547","provenance":"source"},{"date":"2023-12-10","kind":"exploit-public","label":"First public exploit: PoC-in-GitHub","url":"https://github.com/rvzsec/CVE-2023-30547","provenance":"source"}],"speed":{"daysToPublicExploit":237,"firstExploitFrom":"PoC-in-GitHub","daysToKev":null},"priority":{"score":31.8,"factors":[{"name":"In a KEV catalog","points":0.0,"detail":"not listed"},{"name":"Recent KEV listing","points":0.0,"detail":"not listed"},{"name":"Known ransomware use","points":0.0,"detail":"not known"},{"name":"EPSS percentile","points":19.89,"detail":"percentile 0.9945"},{"name":"Named in threat reports","points":0.0,"detail":"0 reports"},{"name":"Public exploit code","points":5.0,"detail":"4 PoC-in-GitHub repos"},{"name":"Mentioned in OTX pulses","points":0.0,"detail":"0 pulses"},{"name":"CVSS severity","points":6.86,"detail":"base score 9.8"},{"name":"End-of-life product","points":0.0,"detail":"supported or unknown"}]},"lineage":{"familyId":"fam-patriksimek-vm2-cve-2021-23449","parents":[{"from":"CVE-2023-29199","to":"CVE-2023-30547","relation":"successor","confidence":"high","kind":"lineage","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vm2","fromFixed":"3.9.16","toFixed":"3.9.17","daysApart":3},{"kind":"same-code","provenance":"machine","files":["lib/transformer.js"],"commits":["https://github.com/patriksimek/vm2/commit/24c724daa7c09f003e556d7cd1c7a8381cb985d7","https://github.com/patriksimek/vm2/commit/4b22e87b102d97d45d112a0931dba1aef7eea049","https://github.com/patriksimek/vm2/commit/f3db4dee4d76b19869df05ba7880d638a880edd5"],"basis":"shared function","functions":["transformer"]}]},{"from":"CVE-2021-23555","to":"CVE-2023-30547","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["lib/transformer.js"],"commits":["https://github.com/patriksimek/vm2/commit/532120d5cdec7da8225fc6242e154ebabc63fe4d","https://github.com/patriksimek/vm2/commit/4b22e87b102d97d45d112a0931dba1aef7eea049","https://github.com/patriksimek/vm2/commit/f3db4dee4d76b19869df05ba7880d638a880edd5"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2022-36067","published":"2022-09-06","fixed":"3.9.11","kev":false},{"cve":"CVE-2023-29017","published":"2023-04-06","fixed":"3.9.15","kev":false},{"cve":"CVE-2023-29199","published":"2023-04-14","fixed":"3.9.16","kev":false},{"cve":"CVE-2023-30547","published":"2023-04-17","fixed":"3.9.17","kev":false},{"cve":"CVE-2023-32313","published":"2023-05-15","fixed":"3.9.18","kev":false,"link":{"from":"CVE-2023-30547","to":"CVE-2023-32313","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vm2","fromFixed":"3.9.17","toFixed":"3.9.18","daysApart":28}]}},{"cve":"CVE-2023-32314","published":"2023-05-15","fixed":"3.9.18","kev":false,"link":{"from":"CVE-2023-30547","to":"CVE-2023-32314","relation":"successor","confidence":"high","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vm2","fromFixed":"3.9.17","toFixed":"3.9.18","daysApart":28},{"kind":"same-code","provenance":"machine","files":["lib/setup-sandbox.js"],"commits":["https://github.com/patriksimek/vm2/commit/4b22e87b102d97d45d112a0931dba1aef7eea049","https://github.com/patriksimek/vm2/commit/f3db4dee4d76b19869df05ba7880d638a880edd5","https://github.com/patriksimek/vm2/commit/d88105f99752305c5b8a77b63ddee3ec86912daf"],"basis":"shared file"}]}},{"cve":"CVE-2023-37466","published":"2023-07-13","fixed":"3.10.0","kev":false}],"package":"npm:vm2"}}