Cross-Site Scripting in google-closure-library

google-closure-library Updated 02 Oct 2025

Summary

02/09/2020
MODERATE
Yes i
Moderate
Not published

GHSA-r9q4-w3fm-wrm2: Cross-Site Scripting in google-closure-library. Affects google-closure-library versions < 20190301.0.0. Fixed in 20190301.0.0. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The google-closure-library is an open-source JavaScript library developed by Google. It provides a set of reusable UI components and utilities for building web applications. The library is widely used and has a large user base. However, versions prior to 20190301.0.0 are vulnerable to Cross-Site Scripting (XSS) attacks.

Vulnerability Detail

The vulnerability in google-closure-library is due to the improper processing of empty elements in the safedomtreeprocessor.processToString() function. This flaw allows attackers to execute arbitrary JavaScript code through Mutation XSS. By exploiting this vulnerability, an attacker can inject malicious scripts into web pages, potentially leading to session hijacking, data theft, or defacement of the affected website.

How To Fix

Minimum fixed version

20190301.0.0

This is the first release that contains the fix.

npm install google-closure-library@20190301.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no known workaround for this vulnerability. It is essential to upgrade to the fixed version of the library to ensure the security of the application.

Conclusion

The google-closure-library prior to version 20190301.0.0 is vulnerable to Cross-Site Scripting (XSS) attacks. It is essential to upgrade to the fixed version to ensure the security of applications using this library. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for google-closure-library →

Share this vulnerability

FAQ

Cross-Site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users. This can lead to various attacks, such as session hijacking, data theft, or defacement of websites.

The safedomtreeprocessor.processToString() function in google-closure-library is responsible for processing DOM elements to generate a string representation. However, it improperly handles empty elements, which can be exploited by attackers to execute arbitrary JavaScript code.

Exploiting this vulnerability can allow attackers to execute arbitrary JavaScript code in the context of the affected user's browser. This can lead to various attacks, including stealing sensitive information, modifying web page content, or performing actions on behalf of the user.

No, only versions prior to 20190301.0.0 are affected by this vulnerability. It is recommended to upgrade to the fixed version to ensure the security of the application.

There are no known public exploits specifically targeting this vulnerability in google-closure-library. However, it is crucial to apply the recommended fix to mitigate the risk of potential attacks.

Related vulnerabilities

Recent vulnerabilities recorded for google-closure-library.

How To Fix

Minimum fixed version

20190301.0.0

This is the first release that contains the fix.

npm install google-closure-library@20190301.0.0

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback