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.
Originally disclosed on Mozilla
- Fixed in 3 months
- Paid in 4 months
- Disclosed after 3 months
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...
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
- Visit the proof-of-concept page.
- A script sends several cross-origin requests to store a random identifier in the preflight cache.
- Another script reads the stored identifier back from the preflight cache.
- 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.