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

Improper synchronization in ScreenCapture (CVE-2026-131062)

A browser-wide singleton for the macOS screen capture picker stores request callbacks in member variables, so a second capture request overwrites the first. Under specific user interaction patterns, a screen capture stream intended for a trusted tab could be delivered to an attacker-controlled tab without further confirmation.

Google Chrome

Originally disclosed on Chrome VRP

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

Overview: A potential race condition in NativeScreenCapturePickerMac allows a malicious website to hijack a screen capture stream intended for a trusted tab. Because the browser-wide singleton stores request callbacks in member variables, a subsequent capture request can unconditionally overwrite them. Under specific user interaction patterns, the native macOS picker selection can be misrouted to the attacker's origin without further confirmation.

Affected files:

  • content/browser/media/capture/native_screen_capture_picker_mac.mm
  • chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc

Estimated timestamp from git blame: 2025-09-09

Potential Race Condition in NativeScreenCapturePickerMac

Location:

  • content/browser/media/capture/native_screen_capture_picker_mac.mm (specifically lines 196-201 and 314-374)
  • chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.cc

Vulnerability Mechanics

NativeScreenCapturePickerMac is a browser-wide singleton class (owned by InProcessVideoCaptureProvider) that facilitates screen-sharing via the macOS system picker API (SCContentSharingPicker) introduced in macOS 14.0/15.0+.

The class stores request-specific callbacks (picker_callback_, cancel_callback_, and error_callback_) as instance member variables of this singleton. When Open() is invoked, these member variables are unconditionally overwritten via move-assignment:

C++
picker_callback_ = std::move(picker_callback);
cancel_callback_ = std::move(cancel_callback);
error_callback_ = std::move(error_callback);

The macOS system picker overlay is non-modal system UI, meaning it does not prevent a user from switching to other browser tabs or windows while the picker is active. If the user switches tabs and triggers another screen-share prompt, a subsequent call to Open() can occur before the first request is resolved or canceled. This overwrites the singleton's active callbacks.

When the user eventually makes a selection in the macOS picker interface, the callback of the latest request is invoked instead of the one associated with the tab for which the selection was initiated. On macOS, delegated source lists (such as window or screen lists) are automatically accepted (ShouldAutoAccept returns true in DesktopMediaListController::ShouldAutoAccept), meaning the resulting media stream is instantly delivered to the active callback's origin with no secondary confirmation step.


Potential Step-by-Step Exploitation Scenario

Note: These are potential steps derived from static analysis of the codebase; our tooling does not currently have the capability to execute live code or run proofs-of-concept.

  1. Preconditions: The victim runs macOS 14.0+ (preferably macOS 15.0+ with SCContentSharingPicker active) and has the media::kUseSCContentSharingPicker flag enabled.
  2. Setup: The user has two tabs open in the same window: Tab A (a trusted origin like Google Meet) and Tab B (an attacker-controlled origin).
  3. Initiation: Tab B requests screen capture via navigator.mediaDevices.getDisplayMedia(...). Chrome displays a tab-modal desktop media picker dialog (Dialog B) on Tab B.
  4. Navigation: The user switches to Tab A. Dialog B is hidden by the browser's web-modal dialog manager because Tab B is no longer active.
  5. Victim Action: The user initiates a screen-share request on Tab A, displaying Dialog M. The user clicks "Share Window" in Dialog M, which calls NativeScreenCapturePickerMac::Open(). This sets active_picker_source_id_ to 1, assigns Tab A's callback to picker_callback_, and opens the macOS system picker overlay.
  6. Tab Switch: While the macOS system picker overlay is visible, the user switches back to Tab B.
  7. Attacker Action: Dialog B reappears on Tab B. The user, confused by seeing a stale Chrome dialog while the macOS picker is active, clicks "Share Window" on Dialog B. This invokes NativeScreenCapturePickerMac::Open() a second time. This increments active_picker_source_id_ to 2 and overwrites picker_callback_ with Tab B's callback. Tab A's original callback is destroyed.
  8. Delivery: The user makes a selection in the macOS system picker. Since stream is nil for the initial selection event, the callback resolves the session ID to the latest active_picker_source_id_ (which is 2). picker_callback_ (now pointing to Tab B) is invoked, and the live stream is routed to the attacker's tab (Tab B) without further confirmation.

Suggested Fix

Instead of storing callbacks as member variables in the NativeScreenCapturePickerMac singleton, associate callbacks with their respective DesktopMediaID::Id (session ID). For example, maintain a map of active sessions (sessions_) that contains both the CaptureSession state and the associated callbacks for each unique session:

C++
struct CaptureSession {
  // ...
  base::OnceCallback<void(webrtc::DesktopCapturer::Source)> picker_callback;
  base::OnceClosure cancel_callback;
  base::OnceClosure error_callback;
};

When a picker event is received from the OS, resolve the correct session using the target session ID or stream map and invoke the callback specifically stored within that session's struct, rather than referencing a singleton-wide member variable.

Evaluated with Chrome root at commit: 208ca3371d87589335b108c431b95a36d768dc47


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 singleton stores per-request callbacks in shared member variables that are overwritten by each new request, so the latest request's callback is used for any pending selection.

Impact

A live screen capture stream could be delivered to an attacker-controlled origin without further confirmation, but only under specific user interaction patterns and with the macOS picker flag enabled.

What the attacker needed

MacOS 14.0+ with SCContentSharingPicker; media::kUseSCContentSharingPicker flag enabled; victim has two tabs open; victim switches tabs during picker

The fix

Callbacks should be associated with their respective session ID in a map rather than stored as singleton-wide member variables.

How it was found

  1. The victim has two tabs open: a trusted origin and an attacker-controlled origin.
  2. The attacker tab requests screen capture, showing a tab-modal picker dialog.
  3. The user switches to the trusted tab, hiding the attacker's dialog.
  4. The user starts a screen share on the trusted tab, opening the macOS system picker.
  5. While the system picker is visible, the user switches back to the attacker tab and clicks its share button, overwriting the callback.
  6. The user makes a selection in the system picker, and the stream is routed to the attacker tab.

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 share your screen, the browser asks which window or screen to share. This report says that if two tabs ask to share at nearly the same time, the browser can mix up which tab gets the result. That could mean a stream you meant for a trusted site is sent to a malicious one.

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.