Invoke Element.requestFullscreen without Fullscreen Security Notification leads to Address Bar UI spoofing
A crafted page could enter fullscreen mode without the browser showing its usual fullscreen notification, by hiding the document root and loading a recursive iframe before requesting fullscreen. Because the user is unaware the page is fullscreen, an attacker could spoof the address bar user interface.
Originally disclosed on Mozilla
- Fixed in 2 months
- Paid in 2 months
- Disclosed after 2 months
Created attachment 9229449 fullscreen-spoof.bundle.html
After set document.documentElement.hidden to true and load recursive iFrame by setting srcdoc to document.documentElement.innerHTML, then subsequently call Element.requestFullscreen the browser goes into fullscreen without any fullscreen notification ("<domain> is now in fullscreen"), as user unaware page displayed fullscreen it can leads to address bar UI spoofing.
Currently the testcase is works most of the time on Linux (default settings) and Windows (with fullscreen transition disabled), but it still intermittent on transition enabled, even so we can ask the victim to try again (e.g. "You're a robot, please try again") until the spoof is success.
However I have another testcase that works most of the time on Windows even with transition enabled, I'm currently testing this I'll share the testcase once I'm done testing =).
Tested works on:
- Firefox Nightly 91.0a1 (2021-06-30) (64-bit)
- Firefox 89.0.2 (64-bit)
- Firefox 78.11.0esr (64-bit)
Steps to reproduce:
- Visit attached fullscreen-spoof.bundle.html
- Hold down "space" or keep clicking until browser goes fullscreen
- The browser goes into fullscreen without any fullscreen notification
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 fullscreen notification logic is bypassed when the document root is hidden and a recursive iframe is loaded via srcdoc before the fullscreen request.
Impact
A page could enter fullscreen without the notification, which may let an attacker spoof the address bar UI; the exploit is intermittent on some systems and the author suggests retrying until it succeeds.
What the attacker needed
Victim visits a crafted page; victim holds space or clicks repeatedly
How it was found
- Open the attached test page in the browser.
- Hold the space bar or keep clicking until the browser enters fullscreen.
- Observe that fullscreen is entered without the usual notification.
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.
When a website goes fullscreen, browsers normally show a notice so you know the page has taken over your screen. This report shows a way to skip that notice, so a page could pretend to be the browser itself, for example by drawing a fake address bar. That could trick someone into trusting a page that is not what it appears to be.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.