Run requestFullscreen and reuse window.open simultaneously in blocking event loop able to overlap fullscreen notification
A page can queue a fullscreen request and a popup refocus while the JavaScript event loop is blocked, so both run at once and the focused popup window overlaps the browser's fullscreen notification toast. This lets a page spoof the fullscreen warning that users rely on to know a site has taken over the screen.
Originally disclosed on Mozilla
- Fixed in 4 months
- Paid in 5 months
- Disclosed after 4 months
Created attachment 9300989 quicktestcase.html
While the event loop is busy then click button to run requestFullScreen and click button to re-launch window.open with same windowName to gain focus, then once the JS event loop is no longer busy, both function will be executed simultaneously, interestingly the focused popup window able to overlap fullscreen notification toast.
For now I'm attaching a quick testcase to demonstrate it can overlap with fullscreen notifications tested working on Linux (X11 and Wayland).
Tested on:
- Firefox Nightly 108.0a1 (2022-10-30) (64-bit) on Arch Linux (X11 and Wayland)
- Firefox Nightly 108.0a1 (2022-10-30) (64-bit) on Ubuntu 22.04.1 LTS (X11 and Wayland)
- Firefox 106.0.1 (64-bit) on Arch Linux (X11 and Wayland)
- Firefox 102.4.0esr (64-bit) on Arch Linux (X11 and Wayland)
Steps to reproduce:
- Open Firefox on Linux (X11 or Wayland)
- Visit attached quicktestcase.html
- Click "Launch Main Window"
- (On new main popup window)
- Click "Launch Spoof Window"
- Minimize the spoof window
- Click "Block Event Loop"
- (While the button and page is freeze)
- Click "requestFullscreen"
- Click "reFocus"
- After a few seconds focused popup window will overlap fullscreen notification toast
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 is drawn as a browser overlay that a focused popup window can be placed above, and the blocked event loop lets the fullscreen request and the window refocus fire together.
Impact
A page could hide the fullscreen notification from the user, weakening a security cue; the report only demonstrates the overlap on Firefox on Linux and does not show any further attack.
What the attacker needed
Firefox on Linux (X11 or Wayland); Victim opens the attacker page; Victim clicks several buttons on the page
How it was found
- Open Firefox on Linux under X11 or Wayland
- Visit the attached test page
- Click the button to launch the main popup window
- In that window, click the button to launch the spoof window and minimise it
- Click the button that blocks the event loop, then click the fullscreen button and the refocus button while the page is frozen
- After a few seconds the focused popup overlaps the fullscreen 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 site goes fullscreen, the browser shows a small warning so you know the page is now covering your screen. This report shows that a page can time things so another window it opened sits on top of that warning, hiding it. That matters because the warning is a safety cue, and hiding it makes it easier to trick someone about what is on screen.
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.