Skip to content
Info disclosure Disclosed report Beginner CVE-2024-38312

Firefox on iOS - Private Browsing Security Bug

Firefox on iOS kept screenshots and session files recording private browsing activity in its app data even after the private tab was closed and private data was cleared. Anyone with access to an iTunes backup of the device could recover the user's private browsing history, including URLs, search queries and timestamps.

4n6focus Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 4 months
  • Disclosed after 3 months

Created attachment 9378192 FirefoxTesting.7z

There are many general and functional related bugs reported on github for iOS Firefox but since this is a security issue I wanted to check if this should be disclosed privately first. Can you please see the below and let me know?

Steps to reproduce

First Test

  1. Launch the Firefox app and start a “Private” browsing session.
  2. Browse to any website. In this test, Duckduckgo[.]com was used.
  3. Generate browsing activity. In this test a DDG search was performed and refreshed.
  4. Close the private mode browsing tab.
  5. Close the Firefox app.
  6. Make basic iTunes backup of the iPhone.
  7. Firefox user data located in “org.mozilla.ios.Firefox”. This contains the folder "/profile.profile/" that contains two subfolders
  • "/TabManagerScreenshots/" contains image files that are screenshots of the private browsing sessions.
  • "/tab-session-data/" contains files with names “tab-“ followed by 32 digit hex strings with 4 hyphens between the strings. Inside these files are the actual URLs that the user was browsing.

These files are persisting despite it being a “private” session that should not store logs or records of the browsing activity.

Second test 8.Repeat steps 1 through 3 to generate additional activity. 9. Go into the Firefox App’s Settings menu. Select “Data Management”. “Browsing History,” “Cache,” “Cookies,”, and “Offline Web Site Data” are selected. Then select “Clear Private Data”. 10. A pop-up appears that warns that “this action will clear all of your private data. It cannot be undone.” Select “OK” to proceed. 11. While still in “Data Management,” select “Web Site Data,” and then touch “Clear All Web Site Data.” A pop-up appears that warns “This action will clear all of your web site data. It cannot be undone”. 12. Repeat step 5 and 6. 13. The artifacts observed in step 7 remain.

Expected behavior

  • Firefox states that while in Private browsing mode, browser logs should not be retained on the device.
  • Attempts to manually clear browser artifacts/logs and caches in the settings menu should result in purging these artifacts from the device.

Actual behavior

  • Closed or manually cleared private browsing history is not visible to the user but Firefox retains many artifacts associated to the user’s Private browsing activity on the device. These include screenshots of the websites and plists containing potentially sensitive data including verbose logs of the search queries made, the URLs that they browsed, and the dates/times of this activity.
  • This could result in disclosure of a user's historical private browsing history (that they thought would have been destroyed) to 3rd parties and presents security and privacy risk.

Device & build information

  • Device: iPhone 12, iOS 17.3
  • Build version: 122.1
  • First seen version: New

The original report as published on Mozilla's Bugzilla, by 4n6focus. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

Root cause

Likely the app wrote tab screenshots and tab session data to its profile directory without excluding them from private sessions or from the clear-private-data routine.

Impact

Private browsing history, including URLs, search queries and timestamps, could be disclosed to third parties who obtain a device backup, despite the user having cleared private data.

What the attacker needed

Physical or backup access to the device; user has used private browsing

How it was found

  1. Open a private browsing session and visit a website, generating some activity.
  2. Close the private tab and then close the app.
  3. Make a basic iTunes backup of the phone.
  4. Inspect the Firefox app data folder and find the screenshots and tab session files.
  5. Repeat the browsing, then clear private data and all web site data from the settings menu.
  6. Back up again and observe that the same files are still present.

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.

Private browsing is meant to leave no trace of what you looked at on the device. Here the app still saved pictures of the pages and files listing the addresses visited, and they survived even after the user pressed the buttons meant to erase everything. Someone who got hold of a backup of the phone could then see what the person had browsed privately.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.