Skip to content
UI spoofing Disclosed report Advanced CVE-2022-22746

reportValidity allow focus stealing can be abused to overlap fullscreen security notification

Calling reportValidity on a window switched focus between a popup and its parent without the usual user-activation checks. An attacker could use this to overlap the fullscreen security notification with a child window, enabling spoofing and focus stealing.

Irvan Kurniawan Follow

Originally disclosed on Mozilla

  • Fixed in 59 days
  • Paid in 2 months
  • Disclosed after 59 days

Created attachment 9245159 spoof-fullscreen-reportvalidity-focus.html

After creating popup with window.open then call requestValidity on parent window or child window, on Windows OS the focus will be switched from popup window to the parent window or vice versa, allowing pop-under popup window and focus stealing.

Normally after request fullscreen then subsequently call childWindow.focus() to overlap fullscreen notification, it will be disallowed, the console will show warning message Opening multiple popups was blocked due to lack of user activation. or Exited fullscreen because a window was focused.

Interestingly when using requestValidity to switch focus to child window after requesting fullscreen, it will be allowed, the fullscreen notification will be overlapped with child window.

Steps to reproduce:

  1. Visit attached spoof-fullscreen-requestvalidity-focus.html
  2. Click "New Window" button
  3. After child window launched, the parent window will regain focus with validation message "Spoof window is ready!"
  4. Click "Spoof" button
  5. Fullscreen notification will be overlapped with child window

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 the focus change triggered by reportValidity bypasses the user-activation checks that normally block focusing another window after a fullscreen request.

Impact

An attacker could overlap the fullscreen security notification with their own window, which may mislead the user about which page is fullscreen; the report is specific to Windows.

What the attacker needed

Victim visits a malicious page; victim clicks a button; Windows OS

How it was found

  1. Open the attached test page.
  2. Click the New Window button.
  3. The parent window regains focus with a validation message.
  4. Click the Spoof button.
  5. The fullscreen notification is overlapped by the child window.

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.

Browsers show a notification when a page goes fullscreen so you know it is not a fake window. This report found a way to move keyboard focus between windows that skipped the normal safety checks, letting a popup cover that notification. That means a malicious page could make its own window look like a trusted fullscreen prompt.

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.