CVE-2020-28503: Prototype Pollution in copy-props
7.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.67849%
CWE
Published
1/6/2022
Updated
2/1/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
copy-props | npm | < 2.0.5 | 2.0.5 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the _setDeep function's handling of nested property assignments. The commit 2c738f5 added prototype pollution checks in this function, specifically looking for 'proto' and 'constructor' keys. Before this patch, the function would follow any provided key path without validation, enabling prototype pollution through specially crafted property chains. The added test cases in copy-props-proc.js demonstrate exploitation scenarios where proto and constructor.prototype keys are used to pollute prototypes, confirming this was the vulnerable code path.