Window.print allow focus stealing can be abused to overlap fullscreen security notification
A race between repeated fullscreen requests on a parent window and a print dialog triggered from a child window lets the child window take focus and cover the fullscreen security notification. An attacker could use this to hide the browser's fullscreen warning from the user.
Originally disclosed on Mozilla
- Fixed in 34 days
- Paid in 34 days
- Disclosed after 34 days
Created attachment 9294630 testcase.html
After create new child window with window.open then invoke requestFullScreen repeatedly on parent window and window.print() on child window simultaneously, the parent window will turn into full screen, then interestingly child window will be focused and overlapping the fullscreen notification.
Tested on:
- Firefox Nightly 106.0a1 (2022-09-14) (64-bit) on Windows 11
- Firefox Nightly 106.0a1 (2022-09-14) (64-bit) on Arch Linux
- Firefox 104.0.2 (64-bit) on Windows 11
- Firefox ESR 91.13.0esr (64-bit) on Windows 11
Steps to reproduce:
- Visit attached testcase.html
- Click "New Window" button
- Click "Spoof" button on parent window
- Fullscreen notification will be overlapped with child window
(There is a race possibility that caused window.print on child window to appear late, if that happens please try 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 focus and z-order race between the fullscreen transition and the print dialog, where the child window is allowed to take focus and render above the fullscreen notification.
Impact
The fullscreen security notification could be hidden from the user, weakening a browser safety indicator; the report notes the timing is racy and may need retries.
What the attacker needed
Victim visits a malicious page; user clicks to open a new window; user clicks to start fullscreen
How it was found
- Open the provided test case page.
- Click the button that opens a new window.
- Click the spoof button on the parent window.
- Observe the child window overlapping the fullscreen notification, retrying if the print dialog appears late.
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 page goes fullscreen, the browser shows a warning so you know it happened. This report shows that a second window opened by the page can grab focus and sit on top of that warning, so the user may not see it. That matters because the warning is a safety signal the browser relies on.
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.