Connect with us

Hi, what are you looking for?

SecurityWeekSecurityWeek

Vulnerabilities

Google Patches Vulnerabilities in Caja Tool

Google has patched several vulnerabilities in Caja that could have been exploited for cross-site scripting (XSS) attacks on the Google Docs and Developers domains.

Google has patched several vulnerabilities in Caja that could have been exploited for cross-site scripting (XSS) attacks on the Google Docs and Developers domains.

Poland-based bug bounty hunter Michał Bentkowski started analyzing Google Docs at the beginning of the year. The expert noticed that users can create scripts in Google Docs using the JavaScript-based scripting language Google Apps Script.

Google Apps Script uses the search giant’s Caja tool to safely embed HTML, CSS and JavaScript in a website. Caja ensures that user-supplied code is sandboxed to prevent phishing and XSS attacks.

Before executing user code, Caja identifies variables and either replaces them with a Caja-supplied object or removes them from the global scope. This prevents, for instance, the use of the window object for XSS attacks.

Bentkowski discovered that while Caja developers have taken into account that attackers could try to bypass this protection by using obfuscation methods – such as writing window as Function(“win”+”dow”) – they neglected Unicode escapes. The researcher found that window can be written as u0077indow, where the “w” character is replaced with its Unicode representation, u0077.

An attacker could have used this trick to create a specially crafted Google Docs document that included an XSS payload.

Google Docs XSS

Google addressed this issue after two weeks, but the researcher determined that the fix was not efficient. An attacker could have also replaced the “w” character in window with u{77}. While this method was not as straightforward as the first one, Bentkowski made it work by using HTML-like comments.

Google later patched this vulnerability as well, but the company forgot to update the version of Caja used for demos on the developers.google.com domain. This oversight could have allowed attackers to launch XSS attacks on developers.google.com in combination with web browser clickjacking vulnerabilities.

Advertisement. Scroll to continue reading.

Caja developers have made some security improvements based on Bentkowski findings. The researcher said Google awarded him $5,000 for the flaws affecting Google Docs and $3,133.7 for the issue on the developer.google.com domain.

Related: Google Increases Android Bug Bounty Payouts

Related: Google Patches Serious Account Recovery Vulnerabilities

Written By

Eduard Kovacs (@EduardKovacs) is a managing 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

Trending

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 the session as we discuss the challenges and best practices for cybersecurity leaders managing cloud identities.

Register

SecurityWeek’s Ransomware Resilience and Recovery Summit helps businesses to plan, prepare, and recover from a ransomware incident.

Register

People on the Move

Shay Mowlem has been named CMO of runtime and application security company Contrast Security.

Attack detection firm Vectra AI has appointed Jeff Reed to the newly created role of Chief Product Officer.

Shaun Khalfan has joined payments giant PayPal as SVP, CISO.

More People On The Move

Expert Insights

Related Content

Vulnerabilities

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

Data Breaches

OpenAI has confirmed a ChatGPT data breach on the same day a security firm reported seeing the use of a component affected by an...

IoT Security

A group of seven security researchers have discovered numerous vulnerabilities in vehicles from 16 car makers, including bugs that allowed them to control car...

Vulnerabilities

A researcher at IOActive discovered that home security systems from SimpliSafe are plagued by a vulnerability that allows tech savvy burglars to remotely disable...

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

Cybercrime

Patch Tuesday: Microsoft calls attention to a series of zero-day remote code execution attacks hitting its Office productivity suite.

Vulnerabilities

Patch Tuesday: Microsoft warns vulnerability (CVE-2023-23397) could lead to exploitation before an email is viewed in the Preview Pane.

IoT Security

A vulnerability affecting Dahua cameras and video recorders can be exploited by threat actors to modify a device’s system time.