Closed
Bug 1267019
Opened 10 years ago
Closed 9 years ago
Address bar spoofing with open redirect url in arbitrary domains
Categories
(Firefox for iOS :: Browser, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: sdna.muneaki.nishimura, Unassigned)
Details
(Keywords: csectype-spoof, reporter-external, sec-moderate)
Attachments
(1 file)
|
98.00 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.22 Safari/537.36
Steps to reproduce:
When Firefox for iOS opens a redirect URL to an invalid scheme the address bar shows the redirector's URL but the browsing context is still caller's origin.
For example, if a malicious web site (mallory.csrf.jp) opens following open redirector in Slack,
https://slack-redir.net/link?url=nttps%3A%2f%2f
then address bar shows above URL but the context is still malicious web site (i.e., mallory.csrf.jp).
It can be used for address bar spoofing attack with bypassing a protection that was introduced by Bug 1224910.
The following link is a PoC of the issue.
https://mallory.csrf.jp/ios/spoofing4.html
Actual results:
The address bar in a new window shows "https://slack-redir.net/..." but the origin of this window still remains unchanged so the opener (mallory.csrf.jp) can change its document.body to the text 'Pwned'.
Expected results:
It should behave as Bug 1224910.
| Reporter | ||
Comment 1•10 years ago
|
||
Note that Chrome for iOS avoids same issue by showing "about:blank" in address bar when loading URL is invalid. Firefox can do so.
Updated•10 years ago
|
Keywords: csectype-spoof,
sec-moderate
| Reporter | ||
Comment 2•10 years ago
|
||
I think the cause of this bug is this line.
https://github.com/mozilla/firefox-ios/commit/58e0e06f8b34e94f1e8becb4c8c04d37f7d24741#diff-6d1fb0cf203fcd3c299d4ba3f07f21deR1705
This code checks if requested scheme is valid only when opening new tab.
In this scenario, the first URL (redirector URL) is valid scheme since it's http or https so this block can be bypassed.
Updated•10 years ago
|
Flags: sec-bounty?
Comment 3•10 years ago
|
||
I think this is essentially the same as bug 1263974 -- bug 1263974 simply used an invalid port instead of an invalid scheme. This should have been fixed by that bug (https://github.com/mozilla/firefox-ios/pull/1745).
Testing the PoC above, I just see a blank web view with the "Search or Enter Address" placeholder text, so that seems to validate that theory.
Muneaki, can you verify that this is no longer an issue?
Flags: needinfo?(sdna.muneaki.nishimura)
| Reporter | ||
Comment 4•10 years ago
|
||
Umm... this issue seems to be resolved by bug 1263974 but I'm not sure current behavior is really expected fix.
As you said when I tried to reproduce the issue I just saw a blank webview with the "Search or Enter Address" placeholder text.
However then the webview is still controllable from parent and the placeholder text is same as system pages e.g., about:home.
This means that an attacker can still possible to give a fake system page by the issue.
The modified version of the PoC is below. This PoC shows a fake login page of Firefox Sync.
https://mallory.csrf.jp/ios/spoofing4.html
Flags: needinfo?(sdna.muneaki.nishimura)
| Reporter | ||
Comment 5•10 years ago
|
||
This is a screenshot of the modified PoC.
Updated•10 years ago
|
Flags: sec-bounty? → sec-bounty+
Comment 6•9 years ago
|
||
I can't reproduce this anymore. Closing.
Thanks for reporting, Muneaki!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Updated•9 years ago
|
Group: firefox-core-security → core-security-release
Updated•6 years ago
|
Group: core-security-release
Updated•2 years ago
|
Keywords: reporter-external
You need to log in
before you can comment on or make changes to this bug.
Description
•