Skip to content
Info disclosure Disclosed report Beginner

Persistent user tracking is possible using window.caches, by avoiding Brave Shields

Brave for iOS's cookie blocker disables cookies, localStorage and sessionStorage but not window.caches, so a site can store a tracking identifier in the persistent cache and read it back after the browser is closed. This allows client-side user tracking even when Brave Shields and cookie blocking are enabled.

nishimunea Follow

Originally disclosed on HackerOne

Medium 6.1 View original
  • Fixed in 2 days
  • Paid in 2 days
  • Disclosed after 10 months

Summary:

The recent version of iOS 15 introduced window.caches in WKWebView. It provides a persistent cache for web pages, and is also potentially usable for user tracking. The current CookieControl.js disables cookie, localStorage and sessionStorage, but it doesn't disable window.caches, so it allows client-side user tracking by window.caches even when cookie brocker is enabled.

Products affected:

  • Brave for iOS Version 1.41.1 (22.7.27.20)
  • iPhone 8 with iOS 15.6

Steps To Reproduce:

  • Enable Brave Shields and block all cookies
  • Visit https://csrf.jp/2022/caches.php
  • Push "Set Tracking ID" button, then your tracking ID is set to window.caches
  • Push "Get Tracking ID" button, then you can confirm your tracking ID that was set above
  • Close your browser and visit the above page again
  • Push "Get Tracking ID" button, then you can see your tracking ID again

Supporting Material/References:

  • Attached is a movie file that demonstrate the above steps to reproduce.

Impact

As witten in summary, client-side user tracking by window.caches is possible even when cookie brocker is enabled.

Attachments

track_with_caches.mp4 From the original on HackerOne

The original report as published on HackerOne, by nishimunea. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 website could track a user across browser sessions even when Brave Shields and cookie blocking are enabled, because the identifier persists in window.caches.

What the attacker needed

Brave for iOS with Shields enabled; Victim visits a malicious or tracking page

The fix

The cookie blocker does not currently disable window.caches.

How it was found

  1. Enable Brave Shields and block all cookies.
  2. Visit the demonstration page.
  3. Press the button to set a tracking ID, which is stored in window.caches.
  4. Press the button to get the tracking ID and confirm it was set.
  5. Close the browser and visit the page again.
  6. Press the button to get the tracking ID and see it is still there.

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.

Websites can store small pieces of data in your browser to remember you, like a name tag. Brave tries to stop this by blocking cookies and similar storage, but it missed a newer storage area called window.caches. A website can put an ID there and read it later, even after you close the browser, so it can still track you.

What is Info disclosure?

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

More by nishimunea

View all

12 more disclosed reports, best first.

More from Brave Software

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.