<select> element with large size then transformed with scale() allow WebRender to render over Firefox UI
A select element with a large size attribute and font-size, when scaled with CSS, was drawn outside its page area and over Firefox's own toolbar and address bar. An attacker could use this to spoof or hide the address bar with a background image or colour.
Originally disclosed on Mozilla
- Fixed in 29 days
- Paid in 22 days
- Disclosed after 29 days
Created attachment 9210903 drawbar.bundle.html
When create <select> element with large size attribute and large font-size, then transform the element with CSS scale(), the element is rendered and stretched over Firefox toolbar and other UI.
mozregression show the regression range is started from commit Bug 1664719 - Pt 2a - Re-enable is_ancestor check:
19:51.48 INFO: Narrowed integration regression window from [b88d1d84, c8102686] (3 builds) to [25a50264, c8102686] (2 builds) (~1 steps left)
19:51.48 INFO: No more integration revisions, bisection finished.
19:51.48 INFO: Last good revision: 25a50264ae3204f2df9add308fc712df45947637
19:51.48 INFO: First bad revision: c8102686489e51edec8a976f013398412577be44
19:51.48 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=25a50264ae3204f2df9add308fc712df45947637&tochange=c8102686489e51edec8a976f013398412577be44
As it able to render over Firefox address bar and toolbar UI, I can assume it's possible to spoof the address bar with background-image or hide the address bar with background-color.
Reproduced on:
- Firefox Nightly 88.0a1 (2021-03-22) (64-bit) on Arch Linux (AMD RENOIR (DRM 3.40.0, 5.11.6-arch1-1, LLVM 11.1.0)
- Firefox Nightly 88.0a1 (2021-03-22) (64-bit) on Windows 10 (AMD A8-7410 R5 Graphics)
- Firefox Nightly 88.0a1 (2021-03-22) (64-bit) on Windows 10 (Intel i5-1035G1)
Steps to Reproduce:
- Open Firefox with WebRender enabled
- Visit attached drawbar.bundle.html or hidebar.bundle.html
- The toolbar is now covered by background-image or background-color
(If toolbar is only partially covered on your screen, try to zoom-in or zoom-out the page, or increase the CSS scale() or <select> size)
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 regression in WebRender's ancestor check, introduced by a specific commit, let a transformed select element escape its page bounds and paint over browser chrome.
Impact
An attacker could spoof or hide the address bar, which may help in phishing, though the report only assumes this is possible.
What the attacker needed
WebRender enabled; victim visits a crafted page
How it was found
- Open Firefox with WebRender enabled
- Visit the attached test page
- Observe the toolbar covered by a background image or colour
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.
Web pages are normally drawn inside their own area, below the browser's toolbar. Here a special dropdown list element, made very large and then stretched with a CSS scale, was drawn on top of the browser's own buttons and address bar. That means a malicious page could paint a fake address bar or cover the real one.
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.