CVE-2023-32314:
vm2 Sandbox Escape vulnerability
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.98481%
CWE
Published
5/15/2023
Updated
11/5/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
vm2 | npm | < 3.9.18 | 3.9.18 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how Proxy handler arguments were handled pre-patch. The PoC demonstrates that when a Proxy's apply trap is invoked, V8 passes arguments as a host-created array (argArray). In vulnerable versions, vm2
failed to properly wrap these host-originating arguments arrays, allowing access to the host's Function
constructor through arguments.constructor.constructor
. The commit adds wrapping logic (wrapProxyHandler
, makeSafeHandlerArgs
) to sanitize handler arguments, confirming the vulnerability existed in the original Proxy handling implementation.