Skip to content
UI spoofing Disclosed report Intermediate CVE-2021-38506

Invoke Element.requestFullscreen then navigate to page on bfcache wouldn't show fullscreen security notification

Firefox would enter fullscreen mode without showing the usual fullscreen security notification when a page requested fullscreen and then navigated to a page restored from the back-forward cache. An attacker could use this to spoof the browser's address bar UI, since the user would not be told the page had gone fullscreen.

Irvan Kurniawan Follow

Originally disclosed on Mozilla

  • Fixed in 24 days
  • Paid in 42 days
  • Disclosed after 24 days

Created attachment 9241190 fullscreen-spoof-form.html

After call element.requestFullScreen() then subsequently navigate to page in bfcache (e.g. using HTMLFormElement.submit(), location.href, or window.location.back(), and etc.) 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.

I've tested this it works everytime I pressed the requestFullScreen button on the testcase using Windows 10 (on my laptop and VM). However on Linux (tested on KDE and GDM) it still require couple of button click to successfully turn browser into fullscreen.

When checking with mozregression I found the browser goes into fullscreen without security notification is after commit Bug 1669961 - Return null from .contentWindow when inner window is inactive. I observe before the commit Firefox will exit the fullscreen mode instead of goes into fullscreen.

Steps to reproduce:

  1. Visit attached fullscreen-spoof-form.html
  2. Click "requestFullScreen" button
  3. Browser goes into fullscreen without any fullscreen notification

The original report as published on Mozilla's Bugzilla, by Irvan Kurniawan. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 change in how inactive inner windows are handled meant the fullscreen state survived a navigation to a bfcache page without re-triggering the security notification.

Impact

The user could be shown a fullscreen page with no warning, enabling address bar UI spoofing; the reporter notes it worked reliably on Windows but needed several clicks on Linux.

What the attacker needed

Victim visits a crafted page; victim clicks a button; navigation to a bfcache page

How it was found

  1. Open the attached test page.
  2. Click the requestFullScreen button.
  3. The browser enters fullscreen with no security notification shown.

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 warning so you know the page is now covering your whole screen. This report found a way to skip that warning by navigating to a page kept in the browser's memory (the back-forward cache, which saves pages so going back is fast). Without the warning, a malicious page could draw fake browser controls and trick the user.

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.

More by Irvan Kurniawan

View all

72 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Clickjacking and UI spoofing

The lesson behind this report.

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.