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

Cross-Site Scripting in google-closure-libraryGHSA-r9q4-w3fm-wrm2

Fix: google/closure-library@c79ab48

GHSA-r9q4-w3fm-wrm2 is a security vulnerability in google-closure-library. A fix is available for google-closure-library — see the affected versions and patch details below.

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

Real-World Exposure

1 pkg affected
📦google-closure-library

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 google-closure-library prior to 20190301.0.0 are vulnerable to Cross-Site Scripting. The safedomtreeprocessor.processToString() function improperly processed empty elements, which could allow attackers to execute arbitrary JavaScript through Mutation Cross-Site Scripting.

Recommendation

Upgrade to version 20190301.0.0 or later.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npmgoogle-closure-libraryall versions20190301.0.0npm install google-closure-library@20190301.0.0

Detection & mitigation playbook

Open-source dependency
  1. Detect

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

  2. Fix

    Update google-closure-library to 20190301.0.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-r9q4-w3fm-wrm2 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 `google-closure-library` prior to 20190301.0.0 are vulnerable to Cross-Site Scripting. The `safedomtreeprocessor.processToString()` function improperly processed empty elements, which could allow attackers to execute arbitrary JavaScript through Mutation Cross-Site Scripting. ## Recommendation Upgrade to version 20190301.0.0 or later.
O3 Security · Impact-Aware SCA

Is GHSA-r9q4-w3fm-wrm2 in your dependencies?

Find it across npm, including transitive dependencies.

Cross-Site Scripting in google-closure-library