Race in Permissions (CVE-2026-11253)
A time-of-check to time-of-use flaw in the Storage Access API permission bubble means that if the top-level page navigates while the bubble is open, the permission grant is saved for the post-navigation URL. An attacker could use this to obtain a Storage Access grant for their own origin without the user approving it.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Project Fortify, an experimental security project, has identified the following potential security issue. If you're a feature owner CC-ed on this bug, please do your best to review these reports without the security team.
Overview: A Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the Storage Access API permission bubble. If a top-level page navigates while the bubble is open, the permission grant is incorrectly saved using the post-navigation URL. An attacker can exploit this to forge a Storage Access grant for their own origin, bypassing the security prompt.
Affected files:
chrome/browser/ui/content_settings/content_setting_bubble_model.cc
Estimated timestamp from git blame: 2023-06-12
Description
There is a potential Time-of-Check to Time-of-Use (TOCTOU) logic vulnerability in how the Storage Access API (SAA) permission bubble persists user choices.
When a user opens the Storage Access bubble to allow a third-party iframe (e.g., idp.com) access to cookies on a top-level site (e.g., victim.com), the UI correctly snapshots the current URL (victim.com) to display in the bubble's text. However, the model incorrectly reads the top-level URL dynamically when committing the changes to the user's profile.
Specifically, in chrome/browser/ui/content_settings/content_setting_bubble_model.cc, the ContentSettingStorageAccessBubbleModel::CommitChanges() method calls:
const GURL& secondary = web_contents()->GetURL();
This occurs when the widget is closing. If a navigation commits while the bubble is still open, ContentSettingBubbleContents::PrimaryPageChanged automatically closes the widget. During the asynchronous destruction of the widget, WindowClosing() invokes CommitChanges(). At this point, web_contents()->GetURL() returns the post-navigation URL.
An attacker can exploit this by opening a popup to a trusted site, waiting for the user to toggle the permission, and immediately navigating the popup to their own malicious site. The grant is then incorrectly saved for the attacker's site.
Potential Reproduction Steps
Note: These are suggested steps to trigger the vulnerability, based on code analysis.
- An attacker (
evil.com) uses JavaScript to open a popup to a benign site (victim.com):let w = window.open('https://victim.com');. victim.comembeds a third-party iframe (idp.com), which callsdocument.requestStorageAccess(). The request is blocked, showing the SAA indicator in the omnibox.- The user clicks the SAA indicator. The bubble opens, asking if
idp.comcan access data onvictim.com. - The user toggles the permission to "Allowed" but does not immediately close the bubble.
- Before the bubble closes, the attacker's page uses its window reference to navigate the popup:
w.location = 'https://evil.com/';. - The navigation commits.
PrimaryPageChangeddetects the navigation and initiates the widget closure. - During the widget's
WindowClosingphase,CommitChanges()is executed. CommitChanges()readsweb_contents()->GetURL(), which is nowhttps://evil.com/.- A 30-day
ALLOWgrant is written to theHostContentSettingsMapfor the pair(idp.com, evil.com)instead of(idp.com, victim.com). - The attacker can now silently embed
idp.comonevil.comand obtain unpartitioned cookies without a prompt.
Suggested Fix
Do not read web_contents()->GetURL() dynamically in CommitChanges(). Instead, snapshot the top-level URL in the constructor of ContentSettingStorageAccessBubbleModel (similar to how ContentSettingGeolocationBubbleModel and ContentSettingRPHBubbleModel handle it) and store it as a member variable. Use this snapshotted URL in CommitChanges() to ensure the permission is granted exclusively to the origin the user actually saw and approved in the UI.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
Results so far have been promising, but there can be wrong deductions. If this proves to be a false positive, please close as WAI; data from false positives will be used to improve accuracy over time. And please feel free to reach out to me directly if you have concerns or feedback on the project.
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
The commit method reads the current top-level URL at the moment the bubble closes instead of using the URL that was shown to the user when the bubble opened.
Impact
The attacker could silently embed the third-party site on their own site and obtain unpartitioned cookies without a prompt.
What the attacker needed
Victim opens a popup from the attacker's site; victim toggles the permission and leaves the bubble open; attacker navigates the popup before the bubble closes
The fix
The top-level URL should be snapshotted when the bubble model is created and that stored value used when committing, rather than reading the current URL at close time.
How it was found
- The attacker opens a popup to a benign site.
- The benign site embeds a third-party iframe that requests storage access, which is blocked and shows an indicator.
- The user clicks the indicator to open the permission bubble.
- The user toggles the permission to allowed but leaves the bubble open.
- The attacker navigates the popup to their own site before the bubble closes.
- The navigation closes the bubble, and the commit saves the grant for the attacker's site.
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 website asks to use cookies in a special way, a small pop-up asks you to allow or block it. This report says that if the page changes to a different website while that pop-up is still open, the 'allow' choice can be saved for the new website instead of the one you saw. That means a malicious site could get permission it was never granted.
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.