Fennec allows address bar spoofing in reader view with userinfo field in front of hostname of url
Fennec's reader view displayed a spoofed address bar showing a trusted hostname while actually loading a different site, because the userinfo portion of the URL was not stripped. An attacker could craft a link that appears to point at a legitimate site but opens attacker-chosen content in reader view.
Originally disclosed on Mozilla
- Fixed in 58 days
- Paid in 2 months
- Disclosed after 58 days
Created attachment 8836438
Screenshot of Firefox when the bug reproduced
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/602.4.8 (KHTML, like Gecko) Version/10.0.3 Safari/602.4.8
Steps to reproduce:
Connect ADB on your Android device that installed Firefox/Fennec and type following commands on the terminal.
1) adb shell
2) am start -a android.intent.action.VIEW -d about:reader?url=https://accounts.google.com%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%[address removed]/security/2017/01/29/mozilla-security-bytes-episode-1-csp/
Actual results:
Firefox/Fennec launches Mozilla security blog in reader view but the address bar shows "https://accounts.google.com".
Expected results:
Userinfo field in front of hostname, i.e., https://{userinfo}@hostname, should be stripped before showing it on the address bar.
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 reader view URL handling did not strip the userinfo component before displaying the address, so the displayed origin did not match the loaded content.
What the attacker needed
Android device with Firefox/Fennec; ADB access to the device; victim opens a crafted link
How it was found
- Connect ADB to an Android device with Firefox/Fennec installed.
- Open an adb shell.
- Launch an intent that opens the reader view with a crafted URL containing a userinfo field before the real host.
- Observe that the blog loads in reader view while the address bar shows the userinfo hostname.
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.
A web address can contain a username part before an @ sign, and everything after the @ is the real site. The browser showed only the part before the @, so the address bar looked like a trusted site while a different page was actually loaded. This lets someone trick a user about which site they are visiting.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.