Miggo Logo

CVE-2020-28277: dset vulnerable to prototype pollution

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.84416%
Published
5/24/2022
Updated
2/1/2024
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
dsetnpm>= 1.0.0, < 2.0.12.0.1

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the dset function's handling of the 'keys' parameter. The function (exported as default in src/index.js) recursively sets nested properties without checking if intermediate keys reference the prototype chain. The provided PoC demonstrates prototype pollution by setting 'proto.polluted', and the commit diff shows the vulnerable logic was in this function. The lack of validation for prototype-related keys before property assignment is the root cause.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

### Ov*rvi*w Prototyp* pollution vuln*r**ility in '*s*t' v*rsions *.*.* t*rou** *.*.* *llows *tt**k*r to **us* * **ni*l o* s*rvi** *n* m*y l*** to r*mot* *o** *x**ution. ### **t*ils T** NPM mo*ul* '*s*t' **n ** **us** *y Prototyp* Pollution vuln*r**

Reasoning

T** vuln*r**ility st*ms *rom t** *s*t *un*tion's **n*lin* o* t** 'k*ys' p*r*m*t*r. T** *un*tion (*xport** *s ****ult in sr*/in**x.js) r**ursiv*ly s*ts n*st** prop*rti*s wit*out ****kin* i* int*rm**i*t* k*ys r***r*n** t** prototyp* ***in. T** provi***