Skip to content
XSS Write-up Intermediate

Clickjacking XSS on google

The Google Crisis Map application validated a layer's source URL only on the client side, allowing a javascript: URI to be saved and later used as a link. An attacker could publish a map containing such a link and use clickjacking to trick a victim into clicking it, executing JavaScript in the google.org origin.

Thomas Orlita Follow

Published on websecblog.com

One of the lesser-known Google projects is Google Crisis Map. It was created to help people find and use critical emergency information.

Thomas Orlita, on websecblog.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Impact

An attacker could execute arbitrary JavaScript in the google.org origin when a victim interacts with a clickjacked iframe, potentially leading to account compromise or data theft, though the attack required multiple user clicks and the XSS was initially self-XSS.

What the attacker needed

A Google account with a custom domain email; victim visits attacker's website; victim clicks twice in the iframe

The fix

The fix was to validate the URL before inserting it into the DOM, using a safe fallback like about:invalid if the URL is not allowed.

How it was found

  1. Log in to Google Crisis Map with a non-gmail account and create a new map.
  2. Add a new layer, enter a title, and set the source URL to a valid URL such as https://example.com.
  3. Save the layer and intercept the save request with a proxy.
  4. Replace the source URL with a javascript: URI and forward the request.
  5. Reload the map page, open the Layers view, and click the Download KML link to trigger the XSS.
  6. Publish the map and embed it in an iframe on an attacker-controlled site, using CSS to position the iframe so clicks on the attacker's page correspond to the Layers tab and then the Download KML link.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

The website checked that a link looked safe only in the browser, not on the server. So an attacker could bypass that check and save a malicious link. Then, by embedding the map in another site, they could trick a user into clicking the link, which would run harmful code in the user's browser on the google.org site.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Thomas Orlita

View all

7 more disclosed reports, best first.

More from Google

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.