CVE-2020-7770: Prototype pollution in json8
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.56231%
CWE
Published
5/10/2021
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:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
json8 | npm | < 1.0.3 | 1.0.3 |
Vulnerability Intelligence
Miggo AI
Root 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.