CVE-2020-28277: dset vulnerable to prototype pollution
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.84416%
CWE
Published
5/24/2022
Updated
2/1/2024
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 |
|---|---|---|---|
| dset | npm | >= 1.0.0, < 2.0.1 | 2.0.1 |
Vulnerability Intelligence
Miggo AI
Root 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.