Skip to content
UI spoofing Disclosed report Intermediate CVE-2022-34479

Resize Popup Window Will Also Render Over the Address Bar leads to Address Bar Spoofing

A popup window resized with window.sizeToContent() on a page with a large top margin could push the address bar UI out of view and replace it with page content, allowing an attacker to spoof the address bar. This was only reproducible on Linux with WebRender enabled.

Irvan Kurniawan Follow

Originally disclosed on Mozilla

  • Fixed in 6 months
  • Paid in 6 months
  • Disclosed after 6 months

Created attachment 9254908 spoof.bundle.html

After resize popup window using window.sizeToContent() on page with large margin top, surprisingly the address bar UI will pushed up and replaced with HTML5 page content, therefore it possible to spoof the address bar.

I can only reproduce this on Linux (X11 and Wayland) and WebRender enabled. But I couldn't reproduce this on WebRender (Software) or gfx.webrender.software set to true.

Tested on:

  • Firefox Nightly 97.0a1 (2021-12-11) (64-bit) using Arch Linux KDE (X11 and Wayland) on Intel i5-1035G1 (1920x1080 DPI 125% and DPI 100%)
  • Firefox Nightly 97.0a1 (2021-12-11) (64-bit) using Arch Linux KDE (X11) on AMD Ryzen PRO 4650G (2560x1440 DPI 125%)
  • Firefox ESR 91.4.0esr (64-bit) using Arch Linux KDE (X11) on AMD Ryzen PRO 4650G (2560x1440 DPI 125%)

Steps to reproduce:

  1. Visit attached spoof.bundle.html
  2. Click "1920x1080" or "2560x1440"
  3. Address bar is now spoofed with HTML5 page content

(Try to increase the marginTop on the testcase if Firefox popup address bar UI still appear on your display.)

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 rendering or layout bug in Firefox's WebRender on Linux where resizing a popup with a large top margin causes the browser chrome (address bar) to be pushed off-screen.

Impact

An attacker could spoof the address bar in a popup window, potentially tricking users into believing they are on a legitimate site; however, the issue was only observed on Linux with WebRender enabled and specific hardware/DPI settings.

What the attacker needed

Linux with WebRender enabled; Victim opens a popup window; Page uses window.sizeToContent(); Page has a large top margin

How it was found

  1. Visit the attached test page.
  2. Click the button for your screen resolution (1920x1080 or 2560x1440).
  3. Observe that the address bar is replaced by page content.

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 you open a popup window in a browser, it usually shows a small address bar so you can see where the page came from. In this bug, resizing the popup in a certain way on Linux made that address bar slide out of view and the page's own content took its place. An attacker could then make the popup look like it was showing a trusted address, tricking users.

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.