# CVE-2020-7642: Cross-site scripting in lazysizes

- Severity: Medium 5.4 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.89%, higher than 60% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2020-04-22T15:13:51.000Z
- Modified: 2026-07-08T06:49:35.784Z
- Also known as: GHSA-hg2p-2cvq-4ppv, SNYK-JS-LAZYSIZES-567144
- Weaknesses: CWE-79
- Assigned by: snyk

## Description

lazysizes through 5.2.0 allows execution of malicious JavaScript. The following attributes are not sanitized by the video-embed plugin: data-vimeo, data-vimeoparams, data-youtube and data-ytparams which can be abused to inject malicious JavaScript.

(As written by CVE List.)

## Affected

- lazysizes: All versions including 5.2.0
- lazysizes (npm): before 5.2.1
- lazysizes_project lazysizes: up to 5.2.0

## Every score

- GitHub: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:3.1 5.4 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`
- NVD: CVSS:2.0 3.5 Low `AV:N/AC:M/Au:S/C:N/I:P/A:N`

## References

- <https://snyk.io/vuln/SNYK-JS-LAZYSIZES-567144> (exploit, third-party-advisory, web)
- <https://github.com/aFarkas/lazysizes/commit/3720ab8262552d4e063a38d8492f9490a231fd48> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2020-7642> (advisory)

## Sources

- CVE List: [CVE-2020-7642](https://www.cve.org/CVERecord?id=CVE-2020-7642), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-hg2p-2cvq-4ppv](https://github.com/advisories/GHSA-hg2p-2cvq-4ppv), CC-BY-4.0, modified 2026-07-08
- NVD: [CVE-2020-7642](https://nvd.nist.gov/vuln/detail/CVE-2020-7642), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2020-7642 · Whole record: https://cve.day/CVE-2020-7642.json · Rebuilt by cve.day 2026-11-25T22:57:52.148Z
