Miggo Logo

CVE-2020-28503: Prototype Pollution in copy-props

7.3

CVSS Score
3.1

Basic Information

EPSS Score
0.67849%
Published
1/6/2022
Updated
2/1/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Package NameEcosystemVulnerable VersionsFirst Patched Version
copy-propsnpm< 2.0.52.0.5

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T** p**k*** *opy-props ***or* *.*.* *r* vuln*r**l* to Prototyp* Pollution vi* t** m*in *un*tion*lity.

Reasoning

T** vuln*r**ility st*ms *rom t** _s*t***p *un*tion's **n*lin* o* n*st** prop*rty *ssi*nm*nts. T** *ommit ******* ***** prototyp* pollution ****ks in t*is *un*tion, sp**i*i**lly lookin* *or '__proto__' *n* '*onstru*tor' k*ys. ***or* t*is p*t**, t** *u