Skip to content
Info disclosure Disclosed report Advanced

Browser Tracking through Preflight Cache

A proof of concept shows that a browser's XHR preflight cache can be used to store a randomly generated identifier that persists after the user clears the browser cache, allowing the user to be tracked across sessions. The author notes the POC did not fully work for them but believes the cache is only cleared on shutdown.

Tom Ritter Follow

Originally disclosed on Mozilla

  • Fixed in 3 months
  • Paid in 4 months
  • Disclosed after 3 months
Text
From https://evercookie.0x41.link/xhrpreflight/

'''
Interesting take aways:
 - On the majority of browsers clearing an entire browser cache doesn't fix this ... you have to additionally restart the browser process.</li>
 - Tor Browser 'new identity' option fails and user can be corellated with previously used identities.

How this POC works :

 - User visits e.g. https://evercookie.0x41.link/xhrpreflight/.
 - A JS script generates a number of XHRs in order to set a randomly generated ID in browsers' XHR preflight cache
 - Another JS script maps out the previously injected ID from the browsers XHR preflight...
 - ID is displayed to the user (this can be used to set the tracking cookie)
'''
This issue was filed in Tor Browser's HackerOne.

I actually couldn't quite get the POC to work, but it seems like it could. If [this is the preflight cache](https://searchfox.org/mozilla-central/search?q=symbol:F_%3CT_nsPreflightCache%3E_mTable&redirect=false) it only ever gets fully cleared upon destruction (shutdown.)  We should call it in other circumstances also...

The original report as published on Mozilla's Bugzilla, by Tom Ritter. 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 browser's preflight cache is only fully cleared when the browser process is destroyed, not when the user clears the cache or starts a new identity.

Impact

A user could be tracked across sessions, and clearing the cache or using Tor Browser's new identity option may not prevent correlation with earlier identities.

What the attacker needed

Victim visits a crafted page; JavaScript enabled; browser kept running between visits

The fix

The preflight cache should be cleared in more circumstances than just browser shutdown, such as when the user clears browsing data or starts a new identity.

How it was found

  1. Visit the proof-of-concept page.
  2. A script sends several cross-origin requests to store a random identifier in the preflight cache.
  3. Another script reads the stored identifier back from the preflight cache.
  4. The identifier is shown to the user and can be saved as a tracking cookie.

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.

When a web page asks a browser to send a request to a different site, the browser first checks with that site in a small 'preflight' exchange and remembers the answer for a while. This report suggests that memory can hold a random number that survives clearing the normal cache, so a site could recognise the same visitor again. That would let someone track you even after you try to wipe your browsing data.

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.