Background application can steal arbitrary web contents through reader-mode
Firefox for iOS runs a local web server for reader mode that remains accessible to other apps in the background. An attacker could use it to steal private web content from other apps, such as GitHub notifications or Facebook data.
Originally disclosed on Mozilla
- Fixed in 2 months
- Paid in 3 months
- Disclosed after 2 months
Created attachment 8794468
steal.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/602.1.50 (KHTML, like Gecko) Version/10.0 Safari/602.1.50
Steps to reproduce:
Reader-mode in Firefox for iOS is hosted on a local web server and readerized web pages can be accessed through following URL.
http://localhost:6571/reader-mode/page?url=https://blog.mozilla.org/security/
This local server runs while in foreground but then background application can access it too.
This means that it can be used for stealing user private web contents from other application.
If you run Firefox for iOS on a Similator on macOS you can reproduce an attack scenario like this.
1) Log in to Github by Firefox for iOS on Simulator
2) Launch terminal application on macOS.
3) Execute "curl http://localhost:6571/reader-mode/page?url=https://github.com/notifications" twice
4) The curl response may contain your private Github notification messages
If you want to reproduce an attack scenario on your device, you need to install an application that implements similar logic to the above.
You can also reproduce it by using "Mercury Browser" application like this.
1) Log in to Facebook on Firefox for iOS
2) Install Mercury Browser on your iOS device
3) Send "steal.html" to your device as an e-mail attachment
4) Open steal.html by Mercury Browser
5) Push the button in steal.html
6) You can see your Facebook contents on Mercury Browser though you've never log in to Facebook on Mercury
The following URL is a video I reproduced these steps on my iPhone.
https://drive.google.com/open?id=0Bw1n4kKdVB6SQklMMEFmRnZVOXc
Actual results:
See above.
Expected results:
Readerized pages should not be accessed from other application.
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
Impact
A background application could steal private web contents from other applications, such as GitHub notifications or Facebook data, if the user is logged in via Firefox for iOS.
What the attacker needed
Firefox for iOS installed and logged in; Attacker app installed on same device; Victim opens attacker's HTML file
The fix
Readerized pages should not be accessible from other applications.
How it was found
- Log in to GitHub using Firefox for iOS on a simulator.
- Open a terminal on the macOS host.
- Run a curl command twice against the local reader-mode URL for the GitHub notifications page.
- Observe that the response may contain private GitHub notification messages.
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.
Firefox for iOS has a feature called reader mode that shows a clean version of web pages. To make this work, it runs a small web server on the phone itself. The bug is that this server keeps running even when Firefox is in the background, and other apps on the phone can talk to it. That means a malicious app could ask the server to fetch private pages (like your GitHub notifications) and read the content.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.