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.
- Fixed in 3 months
- Paid in 4 months
- Disclosed after 3 months
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>
'''
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
- The victim visits a legitimate page that contains an iframe pointing to the attacker's page.
- The attacker's page shows a button that calls a function using window.open with a javascript: URL.
- The function also schedules a second window.open call after a delay.
- 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.