Closed
Bug 1325812
Opened 9 years ago
Closed 6 years ago
Custom URI schemes in the location bar can lead to Location Bar Spoofing
Categories
(Firefox for Android Graveyard :: General, defect, P3)
Tracking
(fennec+)
RESOLVED
WONTFIX
| Tracking | Status | |
|---|---|---|
| fennec | + | --- |
People
(Reporter: jordi.chancel, Unassigned)
References
()
Details
(Keywords: reporter-external, sec-low, Whiteboard: [geckoview-])
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:50.0) Gecko/20100101 Firefox/50.0
Build ID: 20161208153507
Steps to reproduce:
On crafted webpage, copy a custom URL scheme (eg: secure://www.google.com/ ),
paste this custom URL scheme into the Address Bar,
and after, press the "Go to" button on the keyboard (like shown on the demonstration video uploaded in this Bug report).
-1 : Copy a custom URL scheme like secure://www.google.com and paste it into the Addressbar
-2 : Press the "Go to" button on the keyboard to try to go on this address
Actual results:
The Location Bar shows the custom URL scheme address (eg: secure://www.google.com ) leading to a Location Bar Spoofing vulnerability.
Expected results:
The location bar shouldn't show the custom URL scheme address but should show the real web address of the web page visited.
| Reporter | ||
Updated•9 years ago
|
| Reporter | ||
Comment 1•9 years ago
|
||
Updated•9 years ago
|
Flags: sec-bounty?
Comment 2•9 years ago
|
||
Okay, I see that if you copy a URL with a random protocol into the URL bar then we do not show an error or something but instead you are still on the page you were on before and the URL bar shows the URL you just copied. I acknowledge that this is not nice (URL bar and content do not match), but I have a hard time understanding how this could be used for an attack.
Desktop Firefox just launches a search - this might be the best we can do here. It looks like that's what Chrome does too.
Status: UNCONFIRMED → NEW
tracking-fennec: --- → ?
Has STR: --- → yes
Ever confirmed: true
Updated•9 years ago
|
Assignee: nobody → cnevinchen
Updated•9 years ago
|
tracking-fennec: ? → +
Priority: -- → P1
Comment 3•9 years ago
|
||
I first thought that if it's not http or https, we'll treat it as search query... but this is wrong. Because we still need to pass to gecko via browser.js's loadURI method to let Gecko have a chance to handle the URL (e.g. send out an intent for market://detials?id=org.mozilla.fennec_nechen to open Play Store ).
Besides, platform already had a solution for handling this [1]
The problem is that it won't show the correct neterror page for the first time.
But neterror page will be shown for the second time.
Bellow is the code I got from the log[2]
01-17 18:04:54.716/GeckoIntentHelper: Unable to open URI, maybe showing neterrormarkket://details?id=com.whatsapp
01-17 18:05:19.331/GeckoIntentHelper: Unable to open URI, maybe showing neterrormarkket://details?id=com.whatsapp
[1](http://searchfox.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/IntentHelper.java#399)
[2](http://searchfox.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/IntentHelper.java#399)
Hi Sebastian
Could you please help pointing me whom I can seek for help? I think I'm bothering him too much....:)
Flags: needinfo?(s.kaspari)
Comment 4•9 years ago
|
||
(In reply to Nevin Chen [:nechen] from comment #3)
> [1](http://searchfox.org/mozilla-central/source/mobile/android/base/java/org/
> mozilla/gecko/IntentHelper.java#399)
> [2](http://searchfox.org/mozilla-central/source/mobile/android/base/java/org/
> mozilla/gecko/IntentHelper.java#399)
Those are the same links - is this correct?
> Could you please help pointing me whom I can seek for help? I think I'm
> bothering him too much....:)
Yeah, but what exactly do you need help with or what is your question? :)
Flags: needinfo?(s.kaspari)
Comment 5•9 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #4)
> (In reply to Nevin Chen [:nechen] from comment #3)
> > [1](http://searchfox.org/mozilla-central/source/mobile/android/base/java/org/
> > mozilla/gecko/IntentHelper.java#399)
> > [2](http://searchfox.org/mozilla-central/source/mobile/android/base/java/org/
> > mozilla/gecko/IntentHelper.java#399)
>
> Those are the same links - is this correct?
Oh.. sorry... the first link[1] should be http://searchfox.org/mozilla-central/source/mobile/android/base/java/org/mozilla/gecko/IntentHelper.java#533
>
> > Could you please help pointing me whom I can seek for help? I think I'm
> > bothering him too much....:)
>
> Yeah, but what exactly do you need help with or what is your question? :)
My question is "Why GeckoView won't show anything for the first time, but only show the correct neterror page for the second time.
But after looking at the blame of #533... I found this bug seems to be duplicated with bug 1278581?
Flags: needinfo?(s.kaspari)
Comment 6•9 years ago
|
||
Yeah, they seem to be the same. In the other bug snorp (bug 1278581 comment 43) wasn't able to reproduce the issue. Do you have some steps that always lead to us not showing the error page? With that you could NI snorp here again.
Flags: needinfo?(s.kaspari)
Comment 7•9 years ago
|
||
Hi snorp. I can 100% reproduce this issue.
STR
1. Close the app and restart again.
2. Go to www.google.com
3. After the content in 2 is displayed, in url enter aaa://www.google.com
4. There's no "about:neterror....." page.
But...
5. But if you enter aaa://www.google.com again, "about:neterror....." will be displayed. From now on, till you restart the app again, you'll always get the correct "about:neterror....." page if the scheme can't be handled.
Could you please help me verify if this bug is duplicated with bug 1278581?
Does it look like a platform bug?
Thanks!
Flags: needinfo?(snorp)
Updated•9 years ago
|
Assignee: cnevinchen → nobody
| Reporter | ||
Comment 8•9 years ago
|
||
(In reply to Nevin Chen [:nechen] from comment #7)
> Hi snorp. I can 100% reproduce this issue.
>
> STR
> 1. Close the app and restart again.
> 2. Go to www.google.com
> 3. After the content in 2 is displayed, in url enter aaa://www.google.com
> 4. There's no "about:neterror....." page.
> But...
> 5. But if you enter aaa://www.google.com again, "about:neterror....." will
> be displayed. From now on, till you restart the app again, you'll always get
> the correct "about:neterror....." page if the scheme can't be handled.
>
> Could you please help me verify if this bug is duplicated with bug 1278581?
> Does it look like a platform bug?
>
> Thanks!
Nevin, what version of Firefox are you using for your test described in comment 7?
Comment 10•9 years ago
|
||
I could kind of see how you could do something bad with this, but it sounds pretty minor.
Keywords: sec-low
I can't repro with the steps in comment #7 on Nightly. I don't ever get about:neterror, which does sound like bug 1278581 has regressed.
Flags: needinfo?(snorp)
Comment 13•9 years ago
|
||
Does not rise to the severity level of the bug bounty program, especially given the user interaction required.
Flags: sec-bounty? → sec-bounty-
| Reporter | ||
Comment 14•8 years ago
|
||
(In reply to Nevin Chen [:nechen] from comment #7)
> Hi snorp. I can 100% reproduce this issue.
>
> STR
> 1. Close the app and restart again.
> 2. Go to www.google.com
> 3. After the content in 2 is displayed, in url enter aaa://www.google.com
> 4. There's no "about:neterror....." page.
> But...
> 5. But if you enter aaa://www.google.com again, "about:neterror....." will
> be displayed. From now on, till you restart the app again, you'll always get
> the correct "about:neterror....." page if the scheme can't be handled.
>
> Could you please help me verify if this bug is duplicated with bug 1278581?
> Does it look like a platform bug?
-----------------
Now with Firefox 54.0.1 for Android, This Location Bar Spoofing vulnerability needs the same user interactions used in Bug 1162372 (CVE-2015-4476)
-1) Copy the custom URL scheme (eg: secure://www.google.com/ ; httpZ://www.google.com )
-2) Paste this custom URL scheme into the Addressbar,
-3) And press the "Go to" button on the keyboard.
Results:
The Location Bar is directly spoofed by the custom URL scheme (like shown on my attachment "screenshot.png" -> https://bugzilla.mozilla.org/attachment.cgi?id=8821868 uploaded in this Bug report).
Flags: needinfo?(jordi.chancel)
[triage] sec-low: moving to P3 rank 0.
Priority: P2 → P3
Updated•7 years ago
|
Group: firefox-core-security → mobile-core-security
Comment 17•6 years ago
|
||
Wontfix for fennec.
As Chris states going to an existing page then pasting an invalid URL scheme in Fenix results in an unknown protocol error page which is what is expected.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
| Assignee | ||
Updated•5 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
Updated•1 year ago
|
Keywords: reporter-external
Updated•1 year ago
|
Group: mobile-core-security
You need to log in
before you can comment on or make changes to this bug.
Description
•