Firefox for Android Lock Exit Fullscreen Mode with Recursive iFrame
A crafted page using a recursive iframe can put Firefox for Android into fullscreen mode that the back button cannot exit, and the fullscreen state persists even after navigating to a different origin. An attacker could trap a victim in a persistent fullscreen state that is hard to escape.
Originally disclosed on Mozilla
- Fixed in 30 days
- Paid in 23 days
- Disclosed after 30 days
Created attachment 9229653 fullscreen-persistent.fenix.html
When I try to reproduce Bug 1718796 in Firefox for Android, after the browser goes into fullscreen mode I unable to exit the fullscreen using back button, the fullscreen mode is persistent it still persist even navigate to different origin.
Currently the testcase is still intermittent, so there is still chance to able to exit the fullscreen, probably timing between iFrame element target and entering fullscreen.
Tested on:
- Firefox Nightly 91.0a1 (Build #2015819979)
- Firefox Beta 90.0.0-beta.6 (Build #2015818371)
- Firefox 89.1.1 (Build #2015812947)
Steps to reproduce:
- Visit attached fullscreen-persistent.fenix.html
- Single tap or double tap on the page
- When browser goes into fullscreen
- Press back button repeatedly
- The browser won't exit the fullscreen, if otherwise after press back try to tap the page again.
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 a timing or state-handling flaw in how the Android browser tracks fullscreen requests from nested iframe elements, so the exit path does not clear the fullscreen state.
Impact
A victim could be left stuck in fullscreen mode with the back button failing, and the state may persist across navigation to another origin, though the issue is intermittent.
What the attacker needed
Victim opens a crafted page; victim taps the page; timing-dependent, intermittent
How it was found
- Open the attached test page in the browser.
- Single-tap or double-tap on the page.
- Wait for the browser to enter fullscreen mode.
- Press the back button repeatedly.
- Observe that the browser does not leave fullscreen; tapping the page again may sometimes help.
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.
Fullscreen mode is when a web page takes over the whole screen, normally with an easy way out such as the back button. Here a page built with nested frames (a page inside a page, repeated) could leave the browser stuck in fullscreen, and the usual escape route stopped working. The reporter notes it only happened some of the time, so timing seems to matter.
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.