XSS via window.stop() - Google Safen Up
The Google Safen Up application attempted to mitigate XSS by moving the vulnerable content into a sandboxed iframe via an external script. An attacker could bypass this by using window.stop() to prevent the external script from loading, causing the XSS to execute in the original domain.
Published on blog.bentkowski.info
The original lives on blog.bentkowski.info
We do not hold its text, 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
The protection relied entirely on an external JavaScript file to move content into a sandboxed iframe; if that file fails to load, the inline XSS executes in the original domain.
Impact
An attacker could execute arbitrary JavaScript in the context of the original domain, bypassing the sandbox protection and potentially accessing sensitive data.
What the attacker needed
Victim uses Chrome; attacker can time window.stop(); victim visits a crafted URL
How it was found
- Create a URL with an XSS payload in the query parameter.
- Load that URL in an iframe and call window.stop() after a timed delay to prevent the external script from loading.
- Adjust the delay until the XSS executes in the original domain.
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.
A cross-site scripting (XSS) bug lets an attacker run their own JavaScript in a victim's browser on a website. Google tried to protect users by moving the dangerous content into a separate, sandboxed frame, but the attacker found a way to stop the protective script from loading, so the malicious code ran on the real site.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.