Closed Bug 1386163 Opened 9 years ago Closed 4 years ago

Localhost navigation bypass with QR code scanner

Categories

(Firefox for iOS :: General, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: sdna.muneaki.nishimura, Unassigned)

Details

(Keywords: reporter-external, sec-moderate)

Attachments

(1 file)

Attached image QR.png —
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8 Steps to reproduce: QR code scanner on Firefox for iOS allows to launch privileged localhost features such as reader-mode. It allows an attacker to exploit existing bugs on http://localhost:6571. For example, the QR code I attached stores following URL. http://localhost:6571/reader-mode/page?url=https://goo.gl/5YG6s2 Actual results: When you scan the code with Firefox for iOS reader-mode window is launched (localhost navigation block bypass). Then the address bar shows "https://goo.gl/5YG6s2" but the window shows a page of GitHub under HTML injection attack. Here an attacker can abuse existing two bugs on reader-mode, that are Bug 1224425 (HTML injection) and Bug 1293070 (address bar spoofing). Expected results: Nagigation for http://localhost:6571/ should be blocked.
Flags: sec-bounty?
Can someone take a look at this? This has been unexamined since August 3.
Flags: needinfo?(sarentz)
Flags: needinfo?(s.kaspari)
Flags: needinfo?(sarentz)
Justin, would you mind verifying if this bug is still valid?
Flags: needinfo?(jdarcangelo)
Yeah, it looks like this is still valid, but it really doesn't have anything to do with QR code scanning. This seems to just be another avenue to demonstrate the aforementioned Bug 1224425 (HTML injection) and Bug 1293070 (address bar spoofing). If someone could CC me on Bug 1293070, that would be great. I don't have privilege to look at it.
BTW, the reason I'm saying this has nothing to do with QR code scanning is that the same exact behavior happens when you simply enter the address contained within the QR code: http://localhost:6571/reader-mode/page?url=https://goo.gl/5YG6s2
(In reply to Justin D'Arcangelo [:justindarc] from comment #3) > If someone could CC me on Bug 1293070, that would be > great. I don't have privilege to look at it. I've added you to bug 1293070.
Flags: needinfo?(s.kaspari)
Group: firefox-core-security → mobile-core-security

(In reply to Justin D'Arcangelo [:justindarc] from comment #4)

BTW, the reason I'm saying this has nothing to do with QR code scanning is
that the same exact behavior happens when you simply enter the address
contained within the QR code:
http://localhost:6571/reader-mode/page?url=https://goo.gl/5YG6s2

If you type in the address you have attacked yourself. If you use a QR code you can be attacked by whatever has shown you the code. We should treat QR code addresses exactly the same as a web page or external app trying to load the URL. There are many things we block when web pages try to do them that we allow the user to type themselves.

Flags: sec-bounty? → sec-bounty+

Current state of this ticket on v99.1: If I scan the QR code, reader mode opens and try to load the URL "https://goo.gl/5YG6s2". It fails to load, but I can click "Load original page" which then shows the Github page.

(In reply to Daniel Veditz [:dveditz] from comment #6)

(In reply to Justin D'Arcangelo [:justindarc] from comment #4)

BTW, the reason I'm saying this has nothing to do with QR code scanning is
that the same exact behavior happens when you simply enter the address
contained within the QR code:
http://localhost:6571/reader-mode/page?url=https://goo.gl/5YG6s2

If you type in the address you have attacked yourself. If you use a QR code you can be attacked by whatever has shown you the code. We should treat QR code addresses exactly the same as a web page or external app trying to load the URL. There are many things we block when web pages try to do them that we allow the user to type themselves.

We're closing this as won't fix following this comment.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
Group: mobile-core-security

Clearing the needinfo request since this bug has been closed as WONTFIX for 4 years and 6 months.

For more information, please visit BugBot documentation.

Flags: needinfo?(jdarcangelo)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: