Miggo Logo

CVE-2021-23771: Sandbox escape in notevil and argencoders-notevil

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.51994%
Published
3/18/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
notevilnpm<= 1.3.3
argencoders-notevilnpm<= 2.5.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from insufficient sandbox isolation in the code evaluation mechanism. The PoC demonstrates prototype pollution via Object.defineProperty targeting the proto chain within safeEval's execution context. As the primary sandboxed evaluation function, safeEval's failure to properly restrict access to the global prototype chain (despite being marketed as a 'safe' evaluator) directly enables this attack. The vulnerability is explicitly tied to sandbox escape attempts through prototype manipulation, which would be mediated through the core evaluation function.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T*is *****ts *ll v*rsions o* p**k*** not*vil; *ll v*rsions o* p**k*** *r**n*o**rs-not*vil. It is vuln*r**l* to S*n**ox *s**p* l***in* to Prototyp* pollution. T** p**k*** **ils to r*stri*t ****ss to t** m*in *ont*xt, *llowin* *n *tt**k*r to *** or mo*

Reasoning

T** vuln*r**ility st*ms *rom insu**i*i*nt s*n**ox isol*tion in t** *o** *v*lu*tion m****nism. T** Po* **monstr*t*s prototyp* pollution vi* O*j**t.***in*Prop*rty t*r**tin* t** __proto__ ***in wit*in s****v*l's *x**ution *ont*xt. *s t** prim*ry s*n**ox