Skip to content
XSS Disclosed report Advanced CVE-2024-0606

iOS Firefox Focus UXSS

A cross-origin page could open a new window with a javascript: URL and then reopen it, causing script to run in the context of the top-level legitimate site. An attacker could execute arbitrary JavaScript in the victim's origin, leading to universal cross-site scripting.

James Lee Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 4 months
  • Disclosed after 3 months
Text
We are able to achieve UXSS on iOS Firefox Focus with window.open().

document.write shows we are escalating to legitimate top origin site.

PoC demo

Legitimate Top Origin Site: https://qrcodescanerror.000webhost.com/UXSS.php
'''HTML
<iframe src="https://pwning.click/uxsstester.php"/></iframe>
'''
Cross-Origin Malicious Evil Site: https://pwning.click/uxsstester.php
'''HTML
<script>
function a(){
	window.open('javascript:document.write(document.domain)', 'x');
	setTimeout(function(){
		window.open('');
	}, 500000);
}
</script> 
<center><input type="button" class="button" value="Trigger UXSS!" onclick="a()"></center>
'''

The original report as published on Mozilla's Bugzilla, by James Lee. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

How it worked

Root cause

Likely the browser failed to properly isolate the javascript: URL opened via window.open from the top-level origin, allowing script execution in the wrong context.

What the attacker needed

Victim uses iOS Firefox Focus; victim visits a page with attacker iframe; victim clicks a button

How it was found

  1. The victim visits a legitimate page that contains an iframe pointing to the attacker's page.
  2. The attacker's page shows a button that calls a function using window.open with a javascript: URL.
  3. The function also schedules a second window.open call after a delay.
  4. Clicking the button triggers the UXSS, and document.write reveals the top origin's 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 report has not been written yet. The Original tab links to the source.

Universal cross-site scripting (UXSS) is a browser bug that lets one website run its code as if it were another website. Here, a malicious page used window.open to open a new window with a javascript: link, then reopened that window, and the code ran under the legitimate site's address. This breaks the browser's normal rule that scripts from one site cannot touch another 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 James Lee

View all

30 more disclosed reports, best first.

More from Mozilla

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.