Skip to content
Access control Advisory Intermediate CVE-2026-17773

Insufficient validation of untrusted input in Cast (CVE-2026-17773)

The Cast Media Router's origin allowlist for site-initiated tab mirroring was enforced only for one specific app ID and URL scheme, so other app IDs or legacy Cast URLs bypassed the check. Any website could then trigger the Cast device picker and, after the user selected a device, start capturing the current tab's content.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 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 Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A logic flaw in the Cast Media Router's mirroring source detection allows unauthorized origins to bypass the Presentation API allowlist. By using alternative app IDs or legacy URL formats, any website can programmatically trigger the Cast device picker for tab mirroring.

Affected files:

  • components/media_router/common/providers/cast/cast_media_source.cc
  • chrome/browser/media/router/providers/cast/cast_media_route_provider.cc
  • components/media_router/browser/media_sinks_observer.cc
  • components/media_router/common/media_source.cc

Estimated timestamp from git blame: 2018-03-07

Description

The Chromium Cast Media Router implements an origin allowlist (kPresentationApiAllowlist) intended to restrict site-initiated tab mirroring via the Presentation API to a small set of trusted Google origins (e.g., Google Docs, Meet, and YouTube Music). This restriction is enforced in CastMediaRouteProvider::GetOrigins by checking if a MediaSource is a site-initiated mirroring source and then validating the requester's origin against the allowlist.

However, the detection logic in IsSiteInitiatedMirroringSource is incomplete, allowing arbitrary origins to bypass this security control by crafting specific Presentation URLs that the identification logic fails to recognize as mirroring sources, yet the subsequent session initiation logic treats as mirroring requests.

Root Cause

The function IsSiteInitiatedMirroringSource in components/media_router/common/providers/cast/cast_media_source.cc is used to determine if a request should be subject to allowlist enforcement. It currently only identifies sources that use the cast: scheme followed by the specific audio+video streaming app ID (0F5096E8):

C++
bool IsSiteInitiatedMirroringSource(const MediaSource::Id& source_id) {
  return base::StartsWith(
      source_id,
      base::StrCat(
          {"cast:", openscreen::cast::GetCastStreamingAudioVideoAppId()}),
      base::CompareCase::SENSITIVE);
}

There are two potential ways to bypass this identification logic:

  1. Alternative App IDs: An attacker can use the audio-only streaming app ID (85CDB22F) in a cast: URL (e.g., cast:85CDB22F?clientId=...). Since IsSiteInitiatedMirroringSource only checks for the audio+video ID, it returns false. Consequently, CastMediaRouteProvider::GetOrigins returns an empty allowed_origins vector. In components/media_router/browser/media_sinks_observer.cc, an empty origin list is interpreted as a wildcard, allowing all origins to proceed. Despite the audio-only app ID, the resulting session initiated via MirroringActivity will perform tab capture and mirroring.

  2. Legacy Cast URLs: Legacy Cast URLs (e.g., https://google.com/cast#__castAppId__=0F5096E8/...) use the https scheme and thus bypass the prefix-based check in IsSiteInitiatedMirroringSource. These URLs are still recognized as valid Cast Presentation URLs and mirroring sources later in the session initiation process (e.g., in CastActivityManager and MirroringActivity), bypassing the allowlist entirely.

Impact

Any web origin can programmatically initiate site-initiated tab mirroring to a local Cast device. This allows the capturing of the entire current tab's content, including cross-origin iframes. While the attack requires one user interaction to select a device from the trusted Cast picker UI, it represents a bypass of a deliberate security control designed to prevent unauthorized sites from triggering tab capture sessions.

Potential Reproduction Steps

  1. From an HTTPS origin not on the allowlist (e.g., https://example.com), execute the following JavaScript:

    JavaScript
    // Potential bypass using audio-only app ID
    const request = new PresentationRequest('cast:85CDB22F?clientId=123');
    request.start().catch(err => console.log('Picker closed or error:', err));
    

    OR

    JavaScript
    // Potential bypass using legacy URL format
    const request = new PresentationRequest('https://google.com/cast#__castAppId__=0F5096E8/__castClientId__=123');
    request.start().catch(err => console.log('Picker closed or error:', err));
    
  2. Observe that the Cast device picker appears and lists available sinks, which would normally be restricted for these types of mirroring requests on unauthorized origins.

  3. Upon user selection of a device, tab mirroring begins.

Suggested Fix

Update IsSiteInitiatedMirroringSource in components/media_router/common/providers/cast/cast_media_source.cc to correctly identify all forms of site-initiated mirroring sources. This should include all streaming app IDs returned by openscreen::cast::GetCastStreamingAppIds() and the legacy Cast URL prefix kLegacyCastPresentationUrlPrefix defined in components/media_router/common/media_source.h.

Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e


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.

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 function that decides whether a request is a site-initiated mirroring source only matched one app ID with the cast: scheme, so other streaming app IDs and legacy https Cast URLs were not treated as mirroring and skipped the allowlist.

Impact

Any web origin could programmatically initiate tab mirroring to a local Cast device, capturing the entire tab including cross-origin iframes, though one user interaction to select a device is required.

What the attacker needed

Victim visits a malicious HTTPS site; victim selects a Cast device in the picker

The fix

The detection function should be updated to recognise all streaming app IDs and the legacy Cast URL prefix, but the text does not say a fix was applied.

How it was found

  1. From an HTTPS origin not on the allowlist, create a PresentationRequest using the audio-only app ID or a legacy Cast URL.
  2. Call start() on the request and observe that the Cast device picker appears and lists sinks.
  3. After the user selects a device, tab mirroring begins.

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.

The browser has a rule that only a few trusted websites may ask to mirror a tab to a Cast device. The check that decides whether a request is a mirroring request was too narrow, so other kinds of Cast requests slipped past it. A malicious site could therefore show the device picker and, if the user chose a device, capture what was on the tab.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.