Skip to content
Access control Advisory Advanced CVE-2026-8007

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

The ReconnectPresentation method in Chromium's Cast implementation fails to validate the presentation URL, allowing a compromised renderer to inject a malicious URN that triggers full-screen or cross-tab capture without the user-consent desktop picker. An attacker who already controls a renderer and has an active tab-mirroring session could silently escalate to capturing the entire screen or other tabs.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 41 days

Project Fortify, an experimental security project, has identified the following potential security issue.

Overview: A compromised renderer can initiate unauthorized desktop or cross-tab capture by sending a malicious URN to ControllerPresentationServiceDelegateImpl::ReconnectPresentation. Because this method lacks URL validation, it allows the attacker to silently escalate an active tab-mirroring session into a full-screen capture session. This bypasses the user-consent UI (desktop_picker_->Show()) normally required for such capture.

Affected files:

  • components/media_router/browser/presentation/controller_presentation_service_delegate_impl.cc
  • content/browser/presentation/presentation_service_impl.cc
  • chrome/browser/media/router/mojo/media_router_desktop.cc
  • components/media_router/common/media_source.cc
  • chrome/browser/media/router/providers/cast/cast_activity_manager.cc

Estimated timestamp from git blame: 2024-11-06

Description

A potential vulnerability exists in the implementation of ReconnectPresentation that allows a compromised renderer to initiate unauthorized desktop or cross-tab capture without user consent via the desktop picker UI.

The issue resides in ControllerPresentationServiceDelegateImpl::ReconnectPresentation (in components/media_router/browser/presentation/controller_presentation_service_delegate_impl.cc). Unlike StartPresentation, which correctly calls IsValidPresentationUrl to enforce protocol restrictions (e.g., blocking urn: schemes), ReconnectPresentation fails to validate the presentation_urls parameter.

Because GURL accepts urn: as a valid scheme and MediaSource stores the URL spec directly as its ID, an attacker can inject a malicious URN such as urn:x-org.chromium.media:source:desktop:screen:0:0 (for full-screen capture) or urn:x-org.chromium.media:source:desktop:web-contents-media-stream://<pid>:<fid> (for cross-tab capture).

When a ReconnectPresentation request is sent with presentation_id="auto-join" and a malicious URN, MediaRouterDesktop::JoinRoute processes it. If the user is already mirroring a tab to a Cast device, the CAST provider reuses the existing sink and launches a new mirroring activity via CastActivityManager::JoinSession. The MirroringActivity then extracts the attacker-controlled DesktopStreamId from the URN and passes it to the capture service.

Crucially, this JoinRoute path bypasses the desktop_picker_->Show() call, which is the normal user-consent gate for desktop capture and is only present in the CreateRoute path.

Potential Impact

This represents a privilege escalation from tab-mirroring to full-screen or cross-tab capture. While the captured stream is sent to the local Cast sink (e.g., a TV), it constitutes an unauthorized capture of sensitive information from the user's desktop or other open tabs without their knowledge or the required picker UI prompt.

Preconditions

  1. The attacker must compromise a renderer process.
  2. The user must be actively Cast-mirroring a tab from that compromised renderer.

Suggested Reproduction Steps (Conceptual)

Note: These are potential steps as the AI agent cannot execute code to verify a working PoC.

  1. The user visits an attacker-controlled page and initiates Cast tab-mirroring to a local device.
  2. The attacker exploits a separate bug (e.g., in V8) to compromise the renderer process.
  3. The compromised renderer constructs a malicious presentation URL for full-screen capture: urn:x-org.chromium.media:source:desktop:screen:0:0.
  4. The renderer bypasses Blink's JavaScript validation and directly sends a blink.mojom.PresentationService.ReconnectPresentation Mojo IPC message to the Browser process. The message uses the malicious URN and sets presentation_id="auto-join".
  5. In the Browser process, ControllerPresentationServiceDelegateImpl::ReconnectPresentation receives the request. Lacking validation, it passes the URN to MediaRouterDesktop::JoinRoute.
  6. The request routes to CastActivityManager::JoinSession. Because presentation_id is auto-join and the default action policy for the newly created desktop source is kCreateSession, it looks up the active sink for the tab.
  7. CastActivityManager seamlessly terminates the tab-mirroring session and calls LaunchSession to start a new full-screen capture session to the same sink using the malicious URN.
  8. MirroringActivity parses the stream ID (screen:0:0), initializes a DesktopCaptureDevice, and begins streaming the user's entire screen without ever showing the desktop picker UI.

Suggested Fix

Add a call to IsValidPresentationUrl() within ControllerPresentationServiceDelegateImpl::ReconnectPresentation (in components/media_router/browser/presentation/controller_presentation_service_delegate_impl.cc) to validate the provided presentation_urls before processing them, mirroring the logic used in StartPresentation:

C++
  if (presentation_urls.empty()) {
    // ... error handling ...
    return;
  }
  if (!std::ranges::all_of(presentation_urls, IsValidPresentationUrl)) {
    std::move(error_cb).Run(
        PresentationError(PresentationErrorType::NO_PRESENTATION_FOUND,
                          "Invalid presentation URL."));
    return;
  }

Evaluated with Chrome root at commit: 0eb4855bda702feaaa8b899336664f97e3df88b8


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. Please feel free to reach out to me if you have concerns or feedback.

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

Likely the ReconnectPresentation function does not call IsValidPresentationUrl to reject non-http(s) schemes such as urn:, unlike StartPresentation, so attacker-controlled URNs reach the Cast session-joining logic.

Impact

A compromised renderer could escalate an active tab-mirroring session to full-screen or cross-tab capture without the user-consent picker, sending sensitive desktop or other-tab content to the local Cast sink.

What the attacker needed

Attacker compromises a renderer process; user is actively Cast-mirroring a tab from that renderer

The fix

The fix should add a call to IsValidPresentationUrl within ReconnectPresentation to validate the presentation_urls before processing them, mirroring the logic used in StartPresentation.

How it was found

  1. The user visits an attacker-controlled page and starts Cast tab-mirroring to a local device.
  2. The attacker exploits a separate bug to compromise the renderer process.
  3. The compromised renderer sends a ReconnectPresentation IPC message with a malicious URN and presentation_id set to auto-join.
  4. The browser process passes the unvalidated URN to JoinRoute, which reuses the existing Cast sink.
  5. CastActivityManager launches a new mirroring session using the malicious URN, and MirroringActivity starts capturing the desktop without showing the picker.

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.

A renderer is the part of the browser that turns web page code into what you see; if an attacker can run their own code there, they can try to trick the browser's internal messaging. Here, a message meant to reconnect an existing screen-sharing session did not check what kind of screen was being requested, so the attacker could ask for the whole desktop instead of just one tab. Normally the browser shows a picker asking the user to choose what to share, but this path skipped that prompt.

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.