Skip to content
Info disclosure Write-up Advanced

Hacking With XSS Auditor

The XSS Auditor in Chrome, when set to '1;mode=block', redirects to about:blank upon detecting a reflected XSS. An attacker can craft a URL that includes a payload mimicking a script, causing the redirect to about:blank, from which the attacker's page can read the referrer containing sensitive information such as OAuth codes.

homakov.blogspot.com

Published on homakov.blogspot.com

on Hacker News and reddit Previously I wrote how you can use XSS Auditor for Great Good(report to administrator about detected XSS exploits) and how to destroy framebrakers/other scirpts with it(just passing script's code in a random parameter). Today's topic is really interesting.

The author, on homakov.blogspot.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

Root cause

Likely the XSS Auditor's 'mode=block' redirects to about:blank without clearing the referrer, allowing the opener to read sensitive information from the referrer.

Impact

An attacker could steal sensitive information such as OAuth codes or tokens from the referrer, but the attack does not work on HTTPS pages because they do not send a referrer.

What the attacker needed

Victim uses Chrome with XSS Auditor enabled; victim visits attacker's page; target URL redirects and includes sensitive info; target page is HTTP, not HTTPS

How it was found

  1. Choose a URL that redirects to another URL and carries both private info and a custom payload.
  2. Look at the final page's source and pick a script-like snippet to use as the payload.
  3. Put the encoded payload into the original URL's custom payload parameter.
  4. Create a malicious page that opens the crafted URL in an iframe or new window.
  5. When the victim visits, the redirect chain ends at about:blank, and the attacker reads document.referrer containing the private info.

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.

Chrome has a feature called XSS Auditor that tries to block cross-site scripting attacks. When it blocks an attack, it can redirect the page to a blank page. The researcher found that an attacker can trick this feature into redirecting to a blank page that still leaks the original URL, which might contain secret tokens, to the attacker's website.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.