CVE-2020-7642:
Cross-site scripting in lazysizes
5.4
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.56353%
CWE
Published
12/10/2021
Updated
9/5/2023
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
lazysizes | npm | <= 5.2.0 | 5.2.1 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unsafe handling of user-controlled attributes in video embedding functions. The commit diff shows these functions previously lacked input validation using regValidParam
before constructing iframe
HTML. Attackers could inject arbitrary JavaScript
through malicious attribute values that would be directly inserted into innerHTML
. The patch adds validation checks for these specific attributes in these functions, confirming their role in the vulnerability.