Security Experts:

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.

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

view counter
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.