Inappropriate implementation in GetUserMedia (CVE-2026-15119)
A race condition in the browser's audio stream handling allows a compromised renderer to leak a valid session ID and create an orphaned session. This session can then be used to record audio without user notification or permission checks.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 26 days
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: A potential race condition in AudioInputDeviceManager and MediaStreamManager allows a compromised renderer to bypass audio capture security controls. By cancelling a stream request immediately after creating it, a renderer can leak a valid session ID and create an orphaned session. This session can then be used to silently record audio without user notification or permission checks.
Affected files:
content/browser/renderer_host/media/audio_input_device_manager.cccontent/browser/renderer_host/media/audio_input_device_manager.h
Estimated timestamp from git blame: Unknown (Google3 checkout)
Summary
A potential race condition in the browser's handling of audio stream generation allows a compromised renderer to bypass security controls and persistently record audio without any user-facing indicators (like the Omnibox red dot). By cancelling a GenerateStreams request precisely while the browser is querying the OS for audio device parameters, the renderer can induce the browser to leak a valid session_id while failing to clean up the pending session. The renderer can subsequently use this leaked session_id to establish an unauthorized audio stream.
Vulnerability Details
When a renderer requests an audio stream, the browser initiates a sequence that involves an asynchronous call to the underlying audio system. A compromised renderer can race a CancelRequest against this asynchronous operation to leave the system in a vulnerable state.
Suggested steps to trigger this potential vulnerability:
- Initiate Request: A compromised renderer sends a
GenerateStreamsIPC to the browser. - Browser Processing:
MediaStreamManager::HandleAccessRequestResponsecallsAudioInputDeviceManager::Open. This generates a newsession_idand starts an asynchronous OS query (audio_system_->GetInputDeviceInfo), passingAudioInputDeviceManager::OpenedOnIOThreadas the callback. - Early Return:
AudioInputDeviceManager::Openimmediately returns thesession_idtoMediaStreamManagerbefore the async query completes. The device state is set toMEDIA_REQUEST_STATE_OPENING. - Race Condition Trigger: The compromised renderer immediately sends a
CancelRequestIPC. - Failed Cleanup:
MediaStreamManager::CancelRequestcallsAudioInputDeviceManager::Close(session_id). However, because the async query hasn't finished, the session is not yet in thedevices_vector.Closereturns early without cleaning up or invalidating the pending callback (audio_input_device_manager.cc:145-147). - ID Leak:
MediaStreamManagerexecutes thedevice_stopped_callbackto notify the renderer that the stream is closing. This intentionally sends the validsession_idback to the renderer via theMediaStreamDeviceObserver::OnDeviceStoppedIPC (media_stream_manager.cc:2078). - Request Deletion:
MediaStreamManagerdeletes the request from itsrequests_map, tearing down any associated UI proxies. The browser believes the request is fully cancelled. - Zombie Session: Sometime later, the async audio query completes.
AudioInputDeviceManager::OpenedOnIOThreadexecutes and unconditionally adds the session to itsdevices_vector (audio_input_device_manager.cc:178). The session is now active but untracked byMediaStreamManager. - Stream Creation: The compromised renderer uses the leaked
session_idto callRenderFrameAudioInputStreamFactory::CreateStream. - Validation Bypass:
CreateStreamattempts to validate the request viaMediaStreamManager::ValidateAudioSession. This relies onValidateSession, which looks up thesession_idin therequests_map. Because the request was deleted in Step 7, it is not found. Due to a logic flaw intended to handle benign race conditions (if (!request) { return true; }), validation incorrectly passes (media_stream_manager.cc:2378-2380). - Silent Recording:
CreateStreamfinds the orphaned device inAudioInputDeviceManagerand opens the stream. Because the request was deleted, no UI proxy exists, meaning no recording indicators are shown to the user, and revoking permissions has no effect.
Suggested Fix
There are multiple ways to address this issue:
- Track Pending Sessions in AIDM:
AudioInputDeviceManagershould keep track of pending asynchronous open requests. IfCloseis called for a pendingsession_id, it should record the cancellation and ensureOpenedOnIOThreaddoes not add the device to thedevices_list when the callback eventually fires. - Fix Session Validation: The
return truelogic inMediaStreamManager::ValidateSessionis dangerous. If a session is truly untracked, it should returnfalse. However, this requires careful handling to avoid breaking legitimate race conditions where a stream is closing. - Prevent ID Leakage: If a request is cancelled while in
MEDIA_REQUEST_STATE_OPENING, do not execute thedevice_stopped_callback, or do not include the validsession_idin the payload, as the device was never fully handed to the renderer.
The most robust fix is likely #1: ensuring AudioInputDeviceManager correctly aborts pending sessions when Close is called.
Evaluated with Chrome root at commit: 65b3256311f3ab6fb9870eaa522de7e6dd2663bb
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
Likely a race condition where cancelling a pending audio stream request does not properly clean up the session, and a validation logic flaw allows untracked sessions to pass.
Impact
A compromised renderer could silently record audio without user notification or permission checks, and revoking permissions would have no effect.
What the attacker needed
Compromised renderer
The fix
The most robust fix is likely to track pending sessions in AudioInputDeviceManager and ensure that cancelled sessions are not added when the async callback completes.
How it was found
- A compromised renderer sends a GenerateStreams IPC to the browser.
- The browser generates a session_id and starts an asynchronous OS query for audio device info.
- The browser returns the session_id to the renderer before the query completes.
- The renderer immediately sends a CancelRequest IPC.
- The browser's Close function returns early because the session is not yet in the devices_ vector, failing to clean up.
- The browser sends the valid session_id back to the renderer via OnDeviceStopped and deletes the request.
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 compromised renderer (a part of the browser that runs web content) can trick the browser into giving it a secret code (session ID) for an audio recording session. It does this by quickly cancelling a request at just the right moment. Later, it uses that code to start recording audio without the usual warning signs or permission prompts.
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.