Miggo Logo

CVE-2021-23434: Prototype Pollution in object-path

5.6

CVSS Score
3.1

Basic Information

EPSS Score
0.20222%
Published
9/1/2021
Updated
9/8/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
object-pathnpm< 0.11.60.11.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the set function's path component handling. The commit adds a type check and string conversion for 'currentPath', addressing a scenario where array-based path components (e.g., [['proto']]) would bypass prototype pollution checks. The === comparison between array elements (object) and string 'proto' always returns false, allowing unsafe property assignment. The test cases added in test.js explicitly validate this fix by attempting to set properties via array paths containing 'proto'.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T*is *****ts t** p**k*** o*j**t-p*t* ***or* *.**.*. * typ* *on*usion vuln*r**ility **n l*** to * *yp*ss o* *V*-****-***** w**n t** p*t* *ompon*nts us** in t** p*t* p*r*m*t*r *r* *rr*ys. In p*rti*ul*r, t** *on*ition `*urr*ntP*t* === '__proto__'` r*tur

Reasoning

T** vuln*r**ility st*ms *rom t** s*t *un*tion's p*t* *ompon*nt **n*lin*. T** *ommit ***s * typ* ****k *n* strin* *onv*rsion *or '*urr*ntP*t*', ***r*ssin* * s**n*rio w**r* *rr*y-**s** p*t* *ompon*nts (*.*., [['__proto__']]) woul* *yp*ss prototyp* poll