Miggo Logo

CVE-2023-29017:
vm2 vulnerable to sandbox escape

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.99038%
Published
4/7/2023
Updated
4/7/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
vm2npm< 3.9.153.9.15

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the Error.prepareStackTrace handler in setup-sandbox.js. The commit diff shows critical changes to the stack trace processing logic where host CallSite objects were not properly wrapped when passed through prepareStackTrace. The PoC demonstrates exploitation via frames.constructor.constructor() chain, which works because the frames array contained raw host CallSite objects. The patch adds proper wrapping through ensureThis() and sandboxSst handling, confirming this was the vulnerable path.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

vm* w*s not prop*rly **n*lin* *ost o*j**ts p*ss** to `*rror.pr*p*r*St**kTr***` in **s* o* un**n*l** *syn* *rrors. - vm* v*rsion: ~*.*.** - No** v*rsion: **.**.*, **.*.*, **.*.* ### Imp**t * t*r**t **tor **n *yp*ss t** s*n**ox prot**tions to **in r*

Reasoning

T** vuln*r**ility st*ms *rom t** `*rror.pr*p*r*St**kTr***` **n*l*r in `s*tup-s*n**ox.js`. T** *ommit *i** s*ows *riti**l ***n**s to t** st**k tr*** pro**ssin* lo*i* w**r* *ost `**llSit*` o*j**ts w*r* not prop*rly wr*pp** w**n p*ss** t*rou** `pr*p*r*S