Closed Bug 1863838 (CVE-2024-8399) Opened 2 years ago Closed 1 year ago

iOS Firefox Focus javascript URI address bar spoofing

Categories

(Focus :: Security: iOS, defect)

defect

Tracking

(fxios130)

RESOLVED FIXED
Tracking Status
fxios 130 ---

People

(Reporter: proof131072, Assigned: rlitianu)

References

Details

(4 keywords, Whiteboard: [reporter-external] [client-bounty-form] [verif?])

Attachments

(11 files, 2 obsolete files)

We are able to spoof address bar of iOS Firefox Focus with javascript: URI as if we are on https.

This is worse than https://bugzilla.mozilla.org/show_bug.cgi?id=1325955 since javascript:// part is not viewable by users but only facebook.com just like when we are on https.

Flags: sec-bounty?
Attached file 1863838.html (obsolete) —

Tap on Cat to reproduce this.

Group: firefox-core-security → mobile-core-security
Component: Security → Security: iOS
Product: Firefox → Focus
Attached video 1863838.mp4
Attached file 1874573.html (obsolete) —

https://bugzilla.mozilla.org/show_bug.cgi?id=1874573 and non-existent protocol like abcd:// allows to achieve full address bar spoof, but before that let's check anchor click full address bar spoof first.

While this is already semi-full address bar spoof, we are able to completely hide javascript:// part even if we tab multiple times to check that. PoC is same with iOS Firefox for click based one, please test with the attached file.

Attached file 1863838_trick.html

Now, interesting trick here is that iOS Firefox Focus confuses when we load non-existent protocol like abcd:// and so it'll load the URL after that part leading to complete spoof, whether you allow the confirmation or not.

This is anchor tag click version

This is also complete spoof but without opening link with non-existent protocol abcd://google.com achieving Full Address bar Spoof.

Side note which should be confirmed:

This also further proves that "Open Link" UXSS https://bugzilla.mozilla.org/show_bug.cgi?id=1855117 and window.open() one's https://bugzilla.mozilla.org/show_bug.cgi?id=1855030 root cause is different, as I had to use non-existent protocol trick to make it work while "Open Link" didn't need any trick for this spoof.

Attached file 1863838_Final.html

It was the behaviour that only search part is showed on address bar allowing full spoof when we requested non-existent protocol abcd://abcd together.

Please test with this case.

Hi, I confirmed this issue is not fixed on latest 122 so could you test or bring someone to verify this? thanks!

Flags: needinfo?(lmarceau)
Flags: needinfo?(nish.bhasin)

Hello! I don't see any patches for this issue, so I don't think this was planned to be fixed, nor communicated that it was fixed. It's in our backlog. Thank you!

Flags: needinfo?(nish.bhasin)
Flags: needinfo?(lmarceau)

James, I have mentioned it in another ticket too but what exactly are the steps here. We will need that for our QA and also for devs to fix this.

The video is not enough and would like you to provide steps to make sure we are doing the right thing.

Thank you.

Flags: needinfo?(proof131072)

Hi, I already mentioned the step in this report.

https://bugzilla.mozilla.org/show_bug.cgi?id=1863838#c1

Tap on Cat to reproduce this.

Flags: needinfo?(proof131072)

Please tap on Cat to reproduce this on https://bugzilla.mozilla.org/attachment.cgi?id=9376188

Flags: needinfo?(nish.bhasin)

Here's a summary from the above comment and links. Could you confirm this is accurate :james?

Steps to reproduce

  1. Spin off a local server to be able to navigate to the provided 1863838_Final.html use case. This can be done following the steps listed here.
  2. Navigate to the 1863838_Final.html use case.
  3. Click on the cat image shown. FYI clicking on the cat image will navigate to the attached fbspoof.html (attached to this bug for posterity).
  4. Observe the URL appearing in the URL bar.

Actual behavior

The shown URL is "facebook.com"

Expected behavior

The shown URL shouldn't be "facebook.com"

Note

The 1874573 use case commented above is in Firefox iOS whereas the current bug discussion is about Focus iOS. To avoid confusion between bugs, let's keep conversation about the current use case only as both project are not sharing code at the moment. Thank you.

Flags: needinfo?(nish.bhasin)
Attached file fbspoof.html

Hi, a lot's of details are added on comments and the final test case is not 1863838.html but https://bug1863838.bmoattachments.org/attachment.cgi?id=9376188 as I mentioned on https://bugzilla.mozilla.org/show_bug.cgi?id=1863838#c13

other than that, it looks good.

Mh, https://bug1863838.bmoattachments.org/attachment.cgi?id=9376188 is in fact the linked 1863838_Final.html on this ticket no? So I think we I can adjust the above steps, and will deprecate the other attached file to avoid confusion.

Attachment #9362722 - Attachment is obsolete: true
Attachment #9372716 - Attachment is obsolete: true

Yes, thanks!

mreagan or jeremy, can you help find a owner to look at this sec-high issue? Thanks!

Flags: needinfo?(mreagan)
Flags: needinfo?(jeevans)
Attached file 1863838_updated.html

Hi, I updated the PoC and demo video.

Flags: needinfo?(mreagan)

Checking to see who on iOS team might be able to pick this up.

We're able to run both UXSS and Address bar Spoofing together: https://jsfiddle.net/onzyhea9/

Fix: Don't allow to open "javascript://" link

Assignee: nobody → rlitianu
Group: mobile-core-security → core-security-release
Status: NEW → RESOLVED
Closed: 1 year ago
Flags: needinfo?(jeevans)
Resolution: --- → FIXED
Flags: sec-bounty? → sec-bounty+
Attached file advisory.txt
Alias: CVE-2024-8399
Group: core-security-release
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: