Miggo Logo

CVE-2020-7770: Prototype pollution in json8

9.8

CVSS Score
3.1

Basic Information

EPSS Score
0.56231%
Published
5/10/2021
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:H/I:H/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
json8npm< 1.0.31.0.3

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the apply function in json8's merge-patch module. The commit 2e89026 shows explicit prototype pollution protection was added by checking for 'proto' keys and introducing a {pollute: true} option. Before this fix, the function would blindly accept any key including proto when merging objects. The CVE description explicitly states this was the vulnerable component, and the patch adds key validation logic missing in vulnerable versions.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

T*is *****ts t** p**k*** json* ***or* *.*.*. T** *un*tion ***s in t** t*r**t o*j**t t** prop*rty sp**i*i** in t** p*t*, *ow*v*r it *o*s not prop*rly ****k t** k*y **in* s*t, l***in* to * prototyp* pollution.

Reasoning

T** vuln*r**ility st*ms *rom t** *pply *un*tion in json*'s m*r**-p*t** mo*ul*. T** *ommit ******* s*ows *xpli*it prototyp* pollution prot**tion w*s ***** *y ****kin* *or '__proto__' k*ys *n* intro*u*in* * {pollut*: tru*} option. ***or* t*is *ix, t**