Skip to content
Race condition Advisory Advanced CVE-2026-11300

Inappropriate implementation in Permissions (CVE-2026-11300)

A time-of-check to time-of-use flaw in the media stream permission bubble means that if an attacker navigates the tab while the user is choosing a permission, the user's choice may be saved for the new origin instead of the original one. An attacker could get persistent camera or microphone access for their site without the user intending it.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 47 days

Flapjack, 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 Chrome Security team. Please see go/chrome-ai-generated-security-bugs-faq for more information.

Overview: A potential Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in the Media Stream permission bubble. If an attacker navigates the tab while the user is interacting with the bubble, the user's permission choice may be saved to the newly navigated origin instead of the original requester.

Affected files:

  • chrome/browser/ui/content_settings/content_setting_bubble_model.cc

Estimated timestamp from git blame: 2023-07-19

Summary

A potential Time-of-Check to Time-of-Use (TOCTOU) vulnerability exists in ContentSettingMediaStreamBubbleModel. When the user interacts with the camera/microphone permission bubble (e.g., clicking the omnibox icon to change a blocked setting to allowed), the model saves this choice when the bubble closes.

However, ContentSettingMediaStreamBubbleModel::CommitChanges() and UpdateSettings() dynamically retrieve the target origin from the currently active document (GetPage().GetMainDocument()) at the time of closure, rather than using the origin that was active when the bubble was opened. Because widget teardown is asynchronous (especially on macOS or via posted tasks), an attacker can race the teardown process by navigating the page to a malicious origin. If the malicious origin requests media access during this tight window, the user's "Allow" choice is misattributed and persistently saved for the attacker's origin.

Technical Details

Chromium uses a commit-on-close model for omnibox permission bubbles. When a navigation occurs, ContentSettingBubbleContents::PrimaryPageChanged fires and calls GetWidget()->Close(). This closure is asynchronous; WindowClosing() and CommitChanges() are deferred.

During this deferral, the renderer begins executing JavaScript for the newly committed document. If the new document calls navigator.mediaDevices.getUserMedia(), the browser processes this IPC.

Crucially, CommitChanges() has a safety check: it aborts if content_settings->media_stream_access_origin().is_empty(). If the attacker's origin is in the default ASK state, getUserMedia() triggers a prompt, and the origin remains empty, neutralizing the exploit.

However, if the attacker's origin is previously set to BLOCK, the permission request is denied synchronously (MediaStreamDevicesController::RequestPermissions calls its callback immediately). This synchronous callback reaches PermissionBubbleMediaAccessHandler::OnMediaStreamRequestResponse, which populates media_stream_access_origin_ with the attacker's origin before the asynchronous widget teardown completes. When CommitChanges() finally executes, it reads the attacker's origin and applies the user's pending "Allow" choice to it.

Potential Attack Steps

Note: These are suggested/potential steps derived from code analysis; our tooling cannot execute a live proof-of-concept to confirm the exact race timings.

  1. The attacker convinces the user to block camera access on https://evil.com (saving a BLOCK setting).
  2. The attacker opens https://victim.com in a popup, which also has its camera access blocked.
  3. The user clicks the blocked camera icon in the victim.com omnibox, opening the Media Stream bubble.
  4. The user clicks the radio button to "Always allow https://victim.com to access your camera".
  5. Before the user clicks "Done" or clicks away, the attacker's script navigates the popup to https://evil.com.
  6. The navigation initiates an asynchronous close of the bubble.
  7. https://evil.com immediately calls navigator.mediaDevices.getUserMedia({video: true}).
  8. Because evil.com is already blocked, the request resolves synchronously, overwriting the page's media_stream_access_origin_ with https://evil.com.
  9. The asynchronous bubble closure completes, triggering CommitChanges().
  10. CommitChanges() fetches the current origin (https://evil.com) and saves the user's "Allow" selection to the attacker's origin.

Suggested Fix

To prevent this and similar race conditions, the target origin (and potentially the relevant PageSpecificContentSettings state) should be cached in the constructor of ContentSettingMediaStreamBubbleModel when the bubble is created.

In CommitChanges() and UpdateSettings(), the model should use this immutable cached origin instead of dynamically querying PageSpecificContentSettings::GetForFrame(&GetPage().GetMainDocument()). This pattern matches the fix applied previously to ContentSettingStorageAccessBubbleModel.

Evaluated with Chrome root at commit: c0eb5541aebfa4ea08806eaf6e94bcc69f87ab2f


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 permission bubble saves the user's choice using the currently active page's origin at the time the bubble closes, rather than the origin that was active when the bubble opened, and the asynchronous close allows a navigation to change that origin.

Impact

An attacker could persistently gain camera or microphone access for their origin without the user's consent, but the exploit requires precise timing and the attacker's origin must already be blocked.

What the attacker needed

Attacker's origin already blocked for camera; victim site also blocked for camera; user interacts with permission bubble; attacker can navigate the tab during bubble close

The fix

The target origin should be cached when the bubble is created and used in CommitChanges() and UpdateSettings() instead of dynamically querying the current page.

How it was found

  1. The attacker gets the user to block camera access on their site, saving a block setting.
  2. The attacker opens the victim site in a popup, which also has camera access blocked.
  3. The user clicks the blocked camera icon in the victim site's omnibox, opening the permission bubble.
  4. The user selects 'Always allow' for the victim site.
  5. Before the user clicks Done or dismisses the bubble, the attacker's script navigates the popup to the attacker's site.
  6. The attacker's site immediately requests camera access, which resolves synchronously because it is already blocked, overwriting the stored origin.

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 you click a permission bubble to allow or block camera access, the browser normally remembers your choice for the site you were on. This report says that if the page changes to a different site at just the right moment, your choice could be saved for the new site instead. That would let an attacker trick you into giving their site camera access you never agreed to.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.