{"id":"CVE-2023-29199","published":"2023-04-14T18:37:03Z","modified":"2025-02-06T18:45:07Z","title":"vm2 Sandbox escape vulnerability","vendor":"patriksimek","product":"vm2","tier":"tail","description":{"text":"There exists a vulnerability in source code transformer (exception sanitization logic) of vm2 for versions up to 3.9.15, allowing attackers to bypass `handleException()` and leak unsanitized host exceptions which can be used to escape the sandbox and run arbitrary code in host context. 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.16` of `vm2`.\n","provenance":"source","from":"CVE.org"},"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.03852,"percentile":0.9013,"provenance":"source"},"cwes":[{"id":"CWE-913","name":"Improper Control of Dynamically-Managed Code Resources"}],"references":[{"url":"https://github.com/patriksimek/vm2/security/advisories/GHSA-xj72-wvfv-8985","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/patriksimek/vm2/issues/516","tags":["x_refsource_MISC"]},{"url":"https://github.com/patriksimek/vm2/commit/24c724daa7c09f003e556d7cd1c7a8381cb985d7","tags":["x_refsource_MISC"]},{"url":"https://gist.github.com/leesh3288/f05730165799bf56d70391f3d9ea187c","tags":["x_refsource_MISC"]},{"url":"https://github.com/patriksimek/vm2/releases/tag/3.9.16","tags":["x_refsource_MISC"]}],"priority":{"score":24.9,"factors":[{"name":"EPSS percentile","points":18.03},{"name":"CVSS severity","points":6.86}]},"vendorSlug":"patriksimek","affectedVersions":[{"vendor":"patriksimek","product":"vm2","versions":["< 3.9.16"]}],"affected":[{"ecosystem":"npm","package":"vm2","vulnerableRanges":["<3.9.16"],"patched":["3.9.16"],"from":["GHSA-xj72-wvfv-8985"],"provenance":"source"}],"euvd":{"id":"EUVD-2023-1428","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-patriksimek-vm2-cve-2021-23449","parents":[{"from":"CVE-2021-23555","to":"CVE-2023-29199","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/24c724daa7c09f003e556d7cd1c7a8381cb985d7"],"basis":"rarely changed file"}]}],"children":[{"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"]}]}],"packageHistory":[{"cve":"CVE-2022-25893","published":"2022-12-21","fixed":"3.9.10","kev":false},{"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,"link":{"from":"CVE-2023-29017","to":"CVE-2023-29199","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:vm2","fromFixed":"3.9.15","toFixed":"3.9.16","daysApart":8}]}},{"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},{"cve":"CVE-2023-32314","published":"2023-05-15","fixed":"3.9.18","kev":false}],"package":"npm:vm2"}}