Security Experts:

Connect with us

Hi, what are you looking for?



JavaScript Library Introduced XSS Flaw in Google Search

A change made several months ago in an open-source JavaScript library introduced a cross-site scripting (XSS) vulnerability in Google Search and likely other Google products.

A change made several months ago in an open-source JavaScript library introduced a cross-site scripting (XSS) vulnerability in Google Search and likely other Google products.

Japanese security researcher Masato Kinugawa discovered what appeared to be an XSS vulnerability in Google Search. Such a security hole can pose a serious risk and it could be highly useful to malicious actors for phishing and other types of attacks.

According to an analysis conducted by LiveOverflow, the XSS vulnerability was introduced by the use of a library named Closure and its failure to properly sanitize user input.

Closure is a broad JavaScript library designed by Google for complex and scalable web applications. The tech giant has made the library open source and still uses it for many of its applications, including Search, Gmail, Maps and Docs.

The vulnerability was apparently introduced on September 26, 2018, when someone removed a sanitization mechanism reportedly due to some user interface design issues. It was addressed on February 22, 2019, when the change made in September 2018 was reverted. Google is said to have patched the vulnerability shortly after learning of its existence.

Comments posted by developers when the rollback was done confirmed that the issue was related to an HTML sanitizer and that it introduced an XSS flaw in the Google Web Server (GWS) software.

While the analysis of the flaw focused on Google Search, LiveOverflow said the security bug likely affected other Google products that use the Closure library.

It’s unclear if Google has awarded a bug bounty for this vulnerability. SecurityWeek has reached out to Masato Kinugawa for additional information and will update this article if the researcher responds.

LiveOverflow has posted a 13-minute video detailing the vulnerability and its cause.

Related: Expert Earns $5,000 for Google Intranet Vulnerability

Related: Researcher Earns $36,000 for Google App Engine Flaws

Related: Google Removes Vulnerable Library from Android

Written By

Eduard Kovacs (@EduardKovacs) is a contributing editor at SecurityWeek. He worked as a high school IT teacher for two years before starting a career in journalism as Softpedia’s security news reporter. Eduard holds a bachelor’s degree in industrial informatics and a master’s degree in computer techniques applied in electrical engineering.

Click to comment

Daily Briefing Newsletter

Subscribe to the SecurityWeek Email Briefing to stay informed on the latest threats, trends, and technology, along with insightful columns from industry experts.

Join this webinar to learn best practices that organizations can use to improve both their resilience to new threats and their response times to incidents.


Join this live webinar as we explore the potential security threats that can arise when third parties are granted access to a sensitive data or systems.


Expert Insights

Related Content


Less than a week after announcing that it would suspended service indefinitely due to a conflict with an (at the time) unnamed security researcher...

Risk Management

The supply chain threat is directly linked to attack surface management, but the supply chain must be known and understood before it can be...


Apple has released updates for macOS, iOS and Safari and they all include a WebKit patch for a zero-day vulnerability tracked as CVE-2023-23529.

Application Security

Drupal released updates that resolve four vulnerabilities in Drupal core and three plugins.

Cloud Security

VMware vRealize Log Insight vulnerability allows an unauthenticated attacker to take full control of a target system.

Application Security

A CSRF vulnerability in the source control management (SCM) service Kudu could be exploited to achieve remote code execution in multiple Azure services.

IoT Security

Lexmark warns of a remote code execution (RCE) vulnerability impacting over 120 printer models, for which PoC code has been published.


GoAnywhere MFT users warned about a zero-day remote code injection exploit that can be targeted directly from the internet