Security: Background page using iframe can show external protocol dialog in other tabs and without throttling
A background page can navigate an iframe to an external protocol URL, causing the external protocol dialog to appear on the currently focused tab, even if that tab is on a different origin. The dialog repeatedly reappears on any focused tab until the malicious tab is closed, which could pressure the user to proceed or confuse them about the dialog's origin.
Originally disclosed on Mozilla
- Fixed in 8 days
- Paid in 12 days
- Disclosed after 8 days
Created attachment 9253534
spoof-calc-diff-tab.html
This is a standalone bug for Scenario 5 reported in bug 1705211. I didn't previously report separately since I thought this would be fixed in that bug. I assumed that fixing origin display would fix dialog<->tab association, but seems dialog isn't properly associated with the tab in even with fix when using iframes.
When a background page navigates an iframe to an external protocol URL, the external protocol dialog is shown on the currently focused tab. The dialog will repeatedly be shown on the currently focused tab and any other tab if the user switches tabs.
Firefox behaves as expected when a background page navigates itself (whole tab) to an external protocol URL. This issue only seems to occur when the background page performs the navigation using an iframe.
After the fix for bug 1705211, the dialog shows the correct origin (`https://aogarantiza.com` in this case). However, since there's no throttling or user activation requirement, a user can still feel pressured to proceed with the dialog or potentially think the dialog is mistaken about the origin or that it's coming from the browser itself due to the persistence and cross-tab presence. The dialog will keep re-appearing until the user closes the malicious tab, which could be any other tab.
REPRODUCTION CASE
One way to repro is to use Scenario 5's PoC from bug 1705211:
1. Navigate to https://alesandroortiz.com/security/firefox/external-protocol/spoof-calc-diff-tab.html
2. Click "Continue to Google.com" button
Observed: Dialog initiated by background page is shown in the currently active tab, even if the tab is on a different origin. Dialog will repeatedly be shown on any of the focused tabs.
Expected: Dialog is only shown in tab containing iframe which opened the dialog, along with appropriate throttling.
Another way to repro is to use Scenario 4's PoC from bug 1705211:
1. Navigate to https://alesandroortiz.com/security/firefox/external-protocol/spoof-iframe-src-calc.html
2. Switch to another tab or open a new tab
3. (Optional:) Continue switching tabs and opening new tabs.
Observed: Same as first PoC in this report.
Expected: Same as first PoC in this report.
VERSION
Firefox Version: 94.0.2 Stable (Build ID 20211119140621), also repros in 96.0a1 Nightly (Build ID 20211202094249)
Operating System: Windows_NT 10.0 19042
CREDIT INFORMATION
Reporter credit: Alesandro Ortiz https://AlesandroOrtiz.com
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 external protocol dialog is not associated with the tab that initiated the navigation when an iframe is used, and there is no throttling or user activation requirement.
Impact
A user could be pressured to proceed with the dialog or think the dialog is mistaken about the origin or coming from the browser itself, and the dialog keeps reappearing until the malicious tab is closed.
What the attacker needed
Victim visits a malicious page; victim clicks a button; victim switches tabs
How it was found
- Navigate to the provided proof-of-concept page.
- Click the 'Continue to Google.com' button.
- Observe the dialog appears on the currently active tab, even if it is on a different origin.
- Switch to another tab or open a new tab and observe the dialog reappears there.
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 tries to open an app on your computer (like a calculator), Firefox shows a pop-up asking for permission. This report found that a malicious website can make that pop-up appear on a different tab you are looking at, and it keeps coming back until you close the bad tab. That could trick you into clicking 'allow' or make you think the pop-up is from Firefox itself.
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.