Skip to content
XSS Write-up Intermediate

Clickjacking DOM XSS on Google.org

A map layer's source URL was validated only in the browser, so a crafted request could save a javascript: URI. Combined with missing X-Frame-Options, an attacker could clickjack a logged-in user into triggering the script on a published map.

websecblog.com

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

A logged-in user could be tricked into running attacker script on google.org, but the attack required two clicks inside an iframe and only affected that domain.

What the attacker needed

A non-gmail domain account; victim is logged in; victim clicks twice in an iframe

The fix

The URL is now validated before being displayed in the DOM, falling back to about:invalid.

How it was found

  1. Log in with a non-gmail domain account and create a map.
  2. Add a layer with a valid source URL and save it.
  3. Intercept the save request and replace the source URL with a javascript: URI.
  4. Reload the page, open Layers, and click Download KML to fire the script.
  5. Publish the map and embed it in an iframe on an attacker page.
  6. Use CSS to position the iframe so two clicks trigger the script.

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 a link only in the user's browser, so an attacker could bypass that check and store a harmful link. When a victim clicked it, their browser ran the attacker's code. The site also allowed other websites to embed it, which made tricking the victim easier.

What is XSS?

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

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.