Use after free in Chromoting (CVE-2026-10887)
A use-after-free exists in the macOS Chrome Remote Desktop host when the session continuation dialog's controller destroys itself during a button action, leaving a dangling pointer that AppKit later accesses. A remote attacker could race the session timeout to inject a click, potentially leading to remote code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 42 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 without the Chrome Security team. Please see go/chrome-ai-generated-security-bugs-faq for more information.
Overview: A potential Use-After-Free (UAF) vulnerability exists in the macOS Chrome Remote Desktop (CRD) IT2Me host process. The issue occurs when the ContinueWindowMacController synchronously destroys its own instance while handling a button's action message, leaving a dangling pointer that AppKit accesses after the method returns. A remote attacker could potentially exploit this by racing the session timeout to inject a mouse click, bypassing input restrictions and achieving Remote Code Execution.
Affected files:
remoting/host/continue_window_mac.mmremoting/host/continue_window.cc
Estimated timestamp from git blame: 2023-06-12
Summary
A potential Use-After-Free (UAF) vulnerability exists in the macOS Chrome Remote Desktop (CRD) IT2Me host (remote_assistance_host). The vulnerability is triggered during the 30-minute session continuation prompt. The Objective-C controller responsible for the prompt synchronously destroys itself inside its own button handler. When the handler returns to the native AppKit event loop, AppKit attempts to access the freed target object, resulting in a UAF.
Vulnerability Details
In remoting/host/continue_window_mac.mm, the ContinueWindowMacController class handles the UI for the session expiration warning. When the "Continue" button is clicked, the following sequence occurs:
- AppKit calls
-[NSApplication sendAction:to:from:], which dispatches to[ContinueWindowMacController onContinue:]. onContinue:calls_continue_window->ContinueSession().ContinueSession()(inremoting/host/continue_window.cc) synchronously callsHideUi().ContinueWindowMac::HideUi()clears the only strong reference to the controller:controller_ = nil;.- Because Objective-C ARC does not automatically retain
selffor the duration of an instance method, settingcontroller_ = nildrops the reference count to zero. The controller is immediately deallocated whileonContinue:is still executing. onContinue:returns. Control flows back to AppKit'ssendAction:to:from:mechanism.- AppKit internally references the action's
target(the freed controller) orsender(the freedNSButton) to clean up state or manage the responder chain, resulting in a Use-After-Free.
Bypassing Input Restrictions
The CRD host attempts to block remote input while the prompt is visible by calling client_session_control_->SetDisableInputs(true) when the 30-minute timer expires. However, this check can be bypassed due to a cross-thread race condition:
- The 30-minute timer fires on the UI thread and posts an asynchronous task to the Host thread to disable inputs.
- If a remote WebRTC input message arrives at the Host thread before the disable task is processed, it is accepted.
- The Host thread then posts an input injection task (
CGEventPost) back to the UI thread. - The UI thread shows the dialog, then immediately processes the queued
CGEventPosttask. The native macOS WindowServer then delivers the click to the newly visible "Continue" button.
Suggested Attacker Steps
Note: These are potential steps based on code analysis; our tooling agent cannot execute a working proof-of-concept.
- An attacker establishes a remote assistance (IT2Me) connection to a macOS host.
- The attacker tracks the session duration. Just before the 30-minute
kSessionExpirationTimeoutfires, the attacker sprays the macOS heap with controlled Objective-C object payloads via remote WebRTC messages. - The attacker sends a perfectly timed remote "Mouse Down" event aimed at the expected coordinates of the "Continue" button.
- The input message races the
SetDisableInputsIPC, successfully posting aCGEventPosttask to the UI thread just behind theShowUi()task. - The "Continue" dialog appears, and the queued click is immediately injected and processed by AppKit.
onContinue:executes,controller_ = nilis called, and the object is freed. The attacker's heap spray reclaims the freed memory.- When
onContinue:returns, AppKit attempts to use the freedtargetpointer, invoking a virtual method on the attacker's fake object and yielding Remote Code Execution (RCE) in theremote_assistance_hostprocess.
Suggested Fix
The destruction of the ContinueWindowMacController (or the underlying ContinueWindowMac C++ object) should not happen synchronously while the UI is handling an event.
- In
ContinueWindowMac::HideUi(), defer the destruction usingbase::SingleThreadTaskRunner::GetCurrentDefault()->DeleteSoon()or aPostTaskto clear thecontroller_pointer. - Alternatively, use the
NS_VALID_UNTIL_END_OF_SCOPEmacro or a local__strongreference insideonContinue:to ensure the object survives the synchronous teardown until the method returns to AppKit.
Evaluated with Chrome root at commit: 4a3e9db74111a3c6c4b3acfd70050a05077cf27a
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. 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, the controller is deallocated synchronously inside its own action handler because Objective-C ARC does not retain self for the duration of the method, leaving a dangling pointer for AppKit.
Impact
A remote attacker could potentially achieve remote code execution in the remote_assistance_host process, though the report notes this is based on code analysis and no working proof-of-concept was executed.
What the attacker needed
Remote assistance connection; macOS host; timing race with session timeout
The fix
The destruction of the controller should be deferred using DeleteSoon or a PostTask, or a local strong reference should be held to keep the object alive until the method returns.
How it was found
- An attacker establishes a remote assistance (IT2Me) connection to a macOS host.
- The attacker tracks the session duration and, just before the 30-minute timeout, sprays the heap with controlled Objective-C objects via remote WebRTC messages.
- The attacker sends a timed remote mouse-down event aimed at the expected coordinates of the Continue button.
- The input message races the SetDisableInputs IPC, posting a CGEventPost task to the UI thread just behind the ShowUi task.
- The Continue dialog appears and the queued click is injected and processed by AppKit.
- onContinue: executes, controller_ = nil is called, the object is freed, and the attacker's heap spray reclaims the memory; when onContinue: returns, AppKit uses the freed target pointer, invoking a virtual method on the fake object and…
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 use-after-free happens when a program frees an object but keeps using it, like deleting a file and then trying to open it. Here, the dialog controller deletes itself while still handling a button click, so the system later touches freed memory. An attacker might exploit this by racing a timeout to make the program click the button for them.
What is Memory corruption?
Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.