CVE-2020-28282: Prototype pollution in getobject
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.82747%
CWE
Published
10/12/2021
Updated
9/7/2023
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 |
---|---|---|---|
getobject | npm | < 1.0.0 | 1.0.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the set() function's handling of property paths. The function uses getParts() to split user-supplied paths and recursively traverses/creates objects. When a path contains special keywords like 'proto', it modifies the prototype chain instead of the target object. The PoC demonstrates this by polluting Object.prototype.isAdmin. The code at line 48 (obj[prop] = value) directly assigns values to the resolved property, including prototype properties. The get() function's 'create: true' parameter enables path traversal but the critical unsafe assignment occurs in set().