iOS Firefox: widgetmediumtopsitesopenurl allows to open any urls from Safari or apps for spoofing and opening non-HTTP URLs which shouldn't be launchable
A Firefox for iOS widget action accepted arbitrary URL schemes instead of only web links, so a crafted page opened from Safari could make Firefox display spoofed address-bar content and launch non-HTTP URLs. An attacker could use this to mislead users about which site they are on and to trigger other apps' URL handlers.
- Fixed in 2 months
- Paid in 2 months
- Disclosed after 2 months
Created attachment 9469606
widgetmediumtopsitesopenurl.mp4
widgetmediumtopsitesopenurl allows to open any urls from Safari or apps for spoofing and opening non-HTTP URLs (URLs like https://bugzilla.mozilla.org/show_bug.cgi?id=1705094)
Test in https://pwning.geniuscoolcat.com/widgetmediumtopsitesopenurl.html or attached file.
Steps to reproduce:
1. Open https://pwning.geniuscoolcat.com/widgetmediumtopsitesopenurl.html in Safari and tap on "Open Firefox"
2. Any state activation such as switching tab or opening preview will load Address bar Spoofing content as google.com
-
Fix: just like a single case "case .openUrl" has been fixed for bug 1850158 in https://github.com/mozilla-mobile/firefox-ios/commit/379470e960db8ae0193d939d00e3289b370602f7#diff-8ad742ddbba25fb32802ffcff2d1d58e27a1c615666ffa59cd8308eaa75fd5d2R63 to only allow http/https
A single separated case "case .widgetMediumTopSitesOpenUrl" should only allow http/https
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 widget URL handler for the medium top sites action did not restrict accepted schemes to http and https, unlike a similar handler that had already been fixed.
Impact
An attacker could spoof the address bar and cause Firefox to open non-HTTP URLs that should not be launchable, which could mislead users or hand off to other apps.
What the attacker needed
Victim opens a crafted web page; victim taps a button to open Firefox; Firefox for iOS with the widget feature
The fix
The widget medium top sites open URL handler should be restricted to only allow http and https schemes, mirroring the earlier fix for the single open URL case.
How it was found
- Open the provided test page in Safari.
- Tap the "Open Firefox" button on that page.
- Trigger any state activation, such as switching tabs or opening the preview.
- Observe the address bar showing spoofed content as google.com.
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.
Apps on a phone can be asked to open a link by other apps. Firefox for iOS has a widget shortcut that was meant to open ordinary web addresses, but it also accepted other kinds of links. Because of that, a web page could push a link into Firefox that made the address bar show a different site than the one actually loaded, which is a way to trick people.
What is Mobile?
Flaws specific to Android and iOS apps: exported components, deep links, WebViews and data left on the device.