Miggo Logo

CVE-2021-23470: Prototype Pollution in putil-merge

8.2

CVSS Score
3.1

Basic Information

EPSS Score
0.79913%
Published
2/5/2022
Updated
2/3/2023
KEV Status
No
Technology
TechnologyJavaScript

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
putil-mergenpm< 3.8.03.8.0

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability explicitly references the merge() function as the entry point. The GitHub commit shows the fix added a 'constructor' key check in lib/merge.js, confirming this was the vulnerable location. The CVE description and Snyk advisory both attribute the flaw to insufficient input validation in the merge function when handling nested properties. The added test cases in the commit specifically validate() protection against 'constructor'-based prototype pollution, directly linking the vulnerability to this function.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T*is *****ts t** p**k*** putil-m*r** ***or* *.*.*. T** m*r**() *un*tion *o*s not ****k t** v*lu*s p*ss** into t** *r*um*nt. *n *tt**k*r **n supply * m*li*ious v*lu* *y **justin* t** v*lu* to in*lu** t** *onstru*tor prop*rty. Not*: T*is vuln*r**ility

Reasoning

T** vuln*r**ility *xpli*itly r***r*n**s t** `m*r**()` *un*tion *s t** *ntry point. T** *it*u* *ommit s*ows t** *ix ***** * '*onstru*tor' k*y ****k in `li*/m*r**.js`, *on*irmin* t*is w*s t** vuln*r**l* lo**tion. T** *V* **s*ription *n* Snyk **visory *