Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

Cross-Site Scripting in lazysizesGHSA-w4vp-3mq7-7v82

GHSA-w4vp-3mq7-7v82 is a security vulnerability in lazysizes. A fix is available for lazysizes — see the affected versions and patch details below.

Published
Updated
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Aug 31, 2020 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected
📦lazysizes

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects npm packages — download data is not available via public APIs for these ecosystems.

Description

Versions of lazysizes prior to 5.2.1-rc1 are vulnerable to Cross-Site Scripting. The video-embed plugin fails to sanitize the following attributes: data-vimeo, data-vimeoparams, data-youtube and data-ytparams. This allows attackers to execute arbitrary JavaScript in a victim's browser if the attacker has control over the vulnerable attributes.

Recommendation

Upgrade to version 5.2.1-rc1 or later.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmlazysizesall versions5.2.1-rc1npm install lazysizes@5.2.1-rc1

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for lazysizes, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update lazysizes to 5.2.1-rc1 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-w4vp-3mq7-7v82 is resolved across your whole dependency graph.

  3. Workarounds

    Escape or sanitise the affected output on the server side rather than relying on client-side filtering, and add a Content-Security-Policy that blocks inline script execution so injected markup cannot run even if it reaches the page.

Frequently Asked Questions

Versions of `lazysizes` prior to 5.2.1-rc1 are vulnerable to Cross-Site Scripting. The `video-embed` plugin fails to sanitize the following attributes: data-vimeo, `data-vimeoparams`, `data-youtube` and `data-ytparams`. This allows attackers to execute arbitrary JavaScript in a victim's browser if the attacker has control over the vulnerable attributes. ## Recommendation Upgrade to version 5.2.1-rc1 or later.
O3 Security · Impact-Aware SCA

Is GHSA-w4vp-3mq7-7v82 in your dependencies?

Find it across npm, including transitive dependencies.