fingerprinting users in private window using web-worker + indexedDB
Private browsing mode in Chrome allowed web workers to access IndexedDB, so a site could store a persistent counter that survived browser restarts and clearing history, cookies and offline data. An attacker could use this to track users across private and normal windows, even after they clear everything.
Mozilla
Originally disclosed on Mozilla
- Fixed in 20 days
- Paid in 4 months
- Disclosed after 20 days
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36
Steps to reproduce:
It's possible to fingerprint users in private window by first-party and third-party scripts
1. Can be tracked even after browser restarts.
2. Can be tracked even after user clears Everything. (history / cookies / offline data )
Demo:
1. Visit the test page in normal window and private window:
https://cdn.cliqz.com/browser-f/fun-demo/test-webworker-indexed-db.html
It increments visit count, from inside the web-worker and on the page. Both using indexedDB as the storage.
Visit count this point should be 1. Meaning new unique visit.
2. Now restart the browser and visit the page again in both normal and private window.
It increments the counter to 2. Which means private-window behaviour is not as intended. The expectation is that the user is still treated as a new user.
Repeat the steps after selecting clearing everything in `clear recent history`, the counter still increments.
Actual results:
This is a serious bug, as it can be exploited for moving tracking from cookies to web-workers + indexedDB and have a persistent UUID. Which makes it possible to track a user irrespective of private window, across websites.
Also, as per the MDN documentation and this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=781982 , private window should not have access to IndexedDB but as demonstrated web workers are able to use IndexedDB
Expected results:
1. Private window should not have access to IndexedDB even via web workers.
2. IndexedDB state should be cleaned after closing private window.
Although if the user has disabled `always` accept third-party cookies, the attack is only possible as a first-party, but even then I think private window should not allow tracking even from a first-party perspective.
Should also respect clear history / cookies / storage signal
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 private browsing implementation did not block IndexedDB access from web workers, and did not clear IndexedDB state when the private session ended.
Impact
A site could track a user across private and normal windows and across browser restarts, even after the user clears history, cookies and offline data; if third-party cookies are blocked, tracking is limited to first-party scripts.
What the attacker needed
Victim visits a malicious page; browser allows web workers to use IndexedDB; third-party cookies enabled for cross-site tracking
The fix
Private windows should block IndexedDB access even from web workers, clear IndexedDB state when the private window closes, and respect the clear history/cookies/storage signal.
How it was found
- Visit the test page in a normal window and a private window.
- Observe the visit counter shows 1, meaning a new unique visit.
- Restart the browser and visit the page again in both windows.
- Observe the counter increments to 2, showing the private window is not treated as new.
- Clear everything via 'clear recent history' and repeat; the counter still increments.
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, so each visit looks like a new user. Here, a background script (a web worker) could still write to a storage area called IndexedDB, which is normally blocked in private mode. That let a website keep a counter that survived restarts and clearing data, so it could recognise the same person again.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.