Private Browsing tabs can open in normal browsing during PBM teardown
When a private browsing window is closed while a page is still opening many new tabs, some of those tabs can end up opening in the normal browsing window instead. Those tabs carry the logged-in session from the private session, so private activity can leak into the normal browser.
Originally disclosed on Mozilla
- Fixed in 56 days
- Paid in 2 months
- Disclosed after 56 days
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0
Steps to reproduce:
Open a Incoginto Tab. Log into to a website and replace the website url in the following HTML. Then, load the HTML in a new incognito tab and allow it to open multiple tabs. Close the Incognito Browser before the tab opening loop ends.
POC CODE: ([Screen recording on Google Drive](https://drive.google.com/drive/folders/1EufouWm7E4s6I0wijLpz3hr-rSw6aJ1a?usp=sharing).)
'''
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tabblast</title>
<script>
window.onload = () => {
const currentURL = "https://stackoverflow.com/";
for (let i = 0; i < 50000000; i++) {
window.open(currentURL, '_blank');
}
};
</script>
</head>
<body>
</body>
</html>
'''
Actual results:
Incognito Mode tabs shifted to Main Browser with session tokens. But those tabs aren't logged in the browser history.
Expected results:
The incognito tabs shouldn't be moved to Main browser. And if it goes to the main browser, then it should be logged in the browser history.
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 a race during private browsing teardown: tabs still being opened by the page are re-parented to the normal window instead of being discarded with the closing private session.
Impact
Private-session tabs, including their logged-in session tokens, could appear in the normal browser window, though they are not recorded in browser history.
What the attacker needed
Victim visits a page that opens many tabs; victim closes the private window mid-loop
How it was found
- Open a private browsing tab and log in to a website.
- Put that website's address into the provided HTML page.
- Load the HTML page in a new private tab and allow it to open multiple tabs.
- Close the private browser before the tab-opening loop finishes.
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 (incognito) is meant to keep what you do in it separate from your normal browser window. Here, a page that keeps opening new tabs while the private window is being closed caused some tabs to appear in the normal window, still logged in to the site. That means a site you visited privately could show up in your regular browsing session.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.