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

Incorrect authorization in MediaCapture (CVE-2026-95317)

The desktop capture access handler never told the browser which screen or window an extension had been granted, so the session stayed recorded as capturing only the extension's own tab. An extension could therefore record DRM-protected video playing in another tab because the browser believed no insecure capture was happening.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 4 months

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: DesktopCaptureAccessHandler fails to call UpdateTarget when initializing a capture session via the chrome.desktopCapture API. This causes the browser to register the capture target as the requesting extension rather than the actual screen or window, bypassing OutputProtectionProxy checks and potentially allowing extensions to record DRM-protected content.

Affected files:

  • chrome/browser/media/webrtc/desktop_capture_access_handler.cc

Estimated timestamp from git blame: Unknown (Google3 checkout)

Description

A logic flaw exists in DesktopCaptureAccessHandler that prevents the browser from accurately tracking which screen or window is being recorded via the chrome.desktopCapture extension API. This failure bypasses the OutputProtectionProxy security checks, potentially allowing untrusted extensions to record high-quality DRM-protected content (e.g., Widevine L3) playing in other tabs.

When an extension uses chrome.desktopCapture.chooseDesktopMedia and subsequently calls getUserMedia, the request is handled by DesktopCaptureAccessHandler::HandleRequest(). After resolving the target DesktopMediaID and initializing the capture devices, the handler registers the session with its base class by calling UpdateExtensionTrusted() (which calls CaptureAccessHandlerBase::UpdateTrusted()).

Inside CaptureAccessHandlerBase::AddCaptureSession(), a new capture session is created with a default capturing_type of TYPE_WEB_CONTENTS and the target set to the requesting extension's WebContents. A comment explicitly notes: // Assume that the target is the same tab that is requesting capture... This can be changed by calling UpdateTarget().

However, DesktopCaptureAccessHandler never calls UpdateTarget() (unlike DisplayMediaAccessHandler, which correctly does so). Consequently, the capture session remains permanently registered as only capturing the extension's own tab, regardless of whether the user actually selected their entire screen or a specific window.

When a separate tab playing DRM-protected content queries the browser to ensure the display environment is secure, OutputProtectionProxy::ProcessQueryStatusResult() calls CaptureAccessHandlerBase::IsInsecureCapturingInProgress(). This method iterates through active sessions and calls MatchesSession(). Because the attacker's session is incorrectly marked as TYPE_WEB_CONTENTS targeting the extension, MatchesSession() returns false for the DRM tab. The browser incorrectly concludes that no insecure capture is occurring, the CDM releases high-quality video frames, and the extension successfully records them.

Suggested Reproduction Steps

Note: These steps represent a theoretical execution path based on static analysis, as our tooling cannot run live code.

  1. Create a Chrome extension with the desktopCapture permission and install it.
  2. In a separate browser tab, navigate to a site playing DRM-protected video (e.g., Widevine L3 content).
  3. Trigger the extension to call chrome.desktopCapture.chooseDesktopMedia(['screen', 'window']).
  4. As the user, select the entire screen or the specific window containing the DRM tab.
  5. The extension uses the returned streamId to call navigator.mediaDevices.getUserMedia({ audio: false, video: { mandatory: { chromeMediaSource: 'desktop', chromeMediaSourceId: streamId } } }).
  6. Observe that the extension receives a media stream containing high-quality frames of the DRM content, bypassing the expected output protection blanking.

Suggested Fix

In DesktopCaptureAccessHandler::OnDesktopCaptureDevicesObtained(), call UpdateTarget() after calling UpdateExtensionTrusted() to ensure the capture session accurately reflects the user's selected DesktopMediaID:

C++
void DesktopCaptureAccessHandler::OnDesktopCaptureDevicesObtained(
    // ...
    UpdateExtensionTrusted(pending_request->request,
                           pending_request->is_allowlisted_extension);
    
    // Added fix:
    // We need to resolve the stream ID to a DesktopMediaID to call UpdateTarget.
    // (This requires passing the media_id from AcceptRequest down to this callback, 
    // similar to how DisplayMediaAccessHandler does it).
    UpdateTarget(pending_request->request, media_id);
    // ...
}

Evaluated with Chrome root at commit: b7d0c4d810da1b31400f198c70d9720fc8f0e5a0


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

Likely the handler registers the capture session with the default target (the requesting extension's tab) and never calls UpdateTarget with the user-selected screen or window, unlike the display media handler.

Impact

An extension could record high-quality DRM-protected content playing in other tabs, though the report is based on static analysis and was not run live.

What the attacker needed

A Chrome extension with desktopCapture; victim selects screen or window; DRM content playing in another tab

The fix

The handler should call UpdateTarget with the user-selected media identifier after registering the session, as the display media handler does.

How it was found

  1. Install a Chrome extension that holds the desktopCapture permission.
  2. Open a separate tab playing DRM-protected video.
  3. Have the extension request desktop media for screens and windows.
  4. As the user, pick the whole screen or the window holding the DRM tab.
  5. The extension uses the returned stream identifier to open a desktop media stream.
  6. The extension receives high-quality frames of the protected video instead of a blanked stream.

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 an extension records your screen, the browser keeps a note of what is being recorded so it can stop protected video from being shown in high quality. Here the note was never updated, so the browser thought the extension was only recording its own little window. That let the extension capture protected video from another 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.