Inappropriate implementation in Media UI (CVE-2026-13986)
A logic error in MediaNotificationService on ChromeOS lets a pending presentation context be consumed by an unrelated media session. An attacker could hijack the Cast button of a trusted site so that clicking it launches the attacker's receiver URL while the UI still shows the trusted origin.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 45 days
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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A logic error in MediaNotificationService on ChromeOS allows a pending presentation context to be incorrectly consumed by an unrelated media session. This enables an attacker to hijack the Cast button of a trusted site, tricking the user into casting malicious content while the UI indicates they are casting from the trusted origin.
Affected files:
chrome/browser/ui/global_media_controls/media_notification_service.ccchrome/browser/ui/global_media_controls/media_notification_service.hcomponents/global_media_controls/media_item_manager_impl.ccchrome/browser/ui/ash/global_media_controls/media_notification_provider_impl.ccchrome/browser/ui/media_router/media_router_ui.ccchrome/browser/ui/media_router/media_route_starter.ccash/system/media/media_tray.cc
Estimated timestamp from git blame: Unknown (Google3 checkout)
Description
A logic error exists in MediaNotificationService where a pending media_router::StartPresentationContext is stored and consumed without verifying that it belongs to the media session currently initializing its Cast controller.
When a website initiates a presentation request via PresentationRequest.start(), the MediaNotificationService::OnStartPresentationContextCreated method stores the resulting context in a single member variable, context_ (chrome/browser/ui/global_media_controls/media_notification_service.cc:451).
On ChromeOS, opening the Global Media Controls (GMC) triggers the creation of a list view that iterates through all active media sessions. The MediaItemManagerImpl::GetActiveItemIds method (components/global_media_controls/media_item_manager_impl.cc:133) sorts these sessions so that actively playing items are placed at the beginning of the list.
For each session in the list, the GMC UI eventually calls MediaNotificationService::CreateCastDialogControllerForSession. This function contains the following logic:
std::unique_ptr<media_router::CastDialogController>
MediaNotificationService::CreateCastDialogControllerForSession(
const std::string& id) {
auto* web_contents = content::MediaSession::GetWebContentsFromRequestId(id);
// ...
if (context_) {
return media_router::MediaRouterUI::CreateWithStartPresentationContext(
web_contents, std::move(context_));
}
// ...
}
(chrome/browser/ui/global_media_controls/media_notification_service.cc:514-517)
Because the service does not verify that the id (or the associated web_contents) matches the origin that originally created the context_, the first session processed by the GMC list will consume the pending context. Due to the sorting logic, a victim's actively playing session (e.g., YouTube) will be processed before an attacker's paused session, causing the victim's Cast button to be hijacked by the attacker's presentation URLs.
Potential Reproduction Steps
- Victim Activity: Open a trusted site (e.g.,
youtube.com) in a ChromeOS tab and start playing a video. - Attacker Activity: Open an attacker-controlled site in another tab. Ensure it has an active media session (e.g., by playing and then pausing a video).
- Trigger Hijack: The attacker site executes
new PresentationRequest(['https://attacker.com/receiver.html']).start(). This opens the Ash GMC/media tray and sets the globalcontext_in the browser process. - UI Interaction: The GMC displays cards for both YouTube and the attacker site. The YouTube card correctly identifies its origin as
youtube.com. - Execution: The user clicks the Cast button on the YouTube card and selects a device. Because the YouTube card's controller was the first to consume the attacker's
context_, the attacker's receiver URL is launched on the device instead of the expected YouTube content.
Impact
This is a Universal Cross-Origin UI Spoofing vulnerability. An attacker can hijack the Cast functionality of any site with an active media session, leading a user to transmit potentially sensitive content or interact with a malicious receiver application while the Chrome UI misleadingly indicates the session is associated with a trusted origin.
Suggested Fix
Modify MediaNotificationService::CreateCastDialogControllerForSession to verify that the web_contents requesting the controller matches the web_contents (or RenderFrameHost) that created the context_. The StartPresentationContext object contains the render_frame_host_id of the initiator, which can be used for this verification.
Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
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 service stores a single pending presentation context and consumes it for whichever media session is processed first, without checking that the session belongs to the origin that created the context.
Impact
An attacker could hijack the Cast function of any site with an active media session, potentially leading a user to send sensitive content or interact with a malicious receiver while the UI misleadingly shows a trusted origin.
What the attacker needed
ChromeOS device; victim has an active media session; attacker site has an active media session; victim clicks Cast on the trusted card
The fix
The service should check that the requesting web contents matches the render frame host that created the pending context before consuming it.
How it was found
- Open a trusted site in a ChromeOS tab and start playing a video.
- Open an attacker-controlled site in another tab and give it an active media session.
- The attacker site starts a presentation request, which opens the media tray and sets the global context.
- The media tray shows cards for both sites, with the trusted site's card showing its correct origin.
- The user clicks Cast on the trusted site's card and picks a device.
- The attacker's receiver URL is launched on the device instead of the expected content.
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 site asks to cast to a TV or speaker, Chrome stores a small note about which site made the request. A bug meant that note could be picked up by a different site's Cast button. So a user clicking Cast on a trusted site could actually send the attacker's content to the device.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.