Use after free in Actor (CVE-2026-10954)
A use-after-free write exists in the Glic Actor's ClickDispatcher and TypeTool because a synchronous JavaScript listener can detach the frame and destroy the tool while HandleInputEvent is still running. An attacker could reclaim the freed memory and overwrite it with a WebMouseEvent, potentially leading to renderer remote code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 40 days
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 without the Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A Use-After-Free (UAF) vulnerability exists in the Glic Actor's ClickDispatcher and TypeTool when dispatching input events. The synchronous HandleInputEvent() call can trigger a JavaScript listener that detaches the local root frame, synchronously destroying the tool's heap allocation. When execution resumes, it uses a dangling this pointer to write to the freed chunk, creating an exploitable primitive that bypasses MiraclePtr.
Affected files:
chrome/renderer/actor/click_dispatcher.ccchrome/renderer/actor/click_tool.hchrome/renderer/actor/tool_executor.ccchrome/renderer/actor/type_tool.h
Estimated timestamp from git blame: 2025-12-10
Summary
A Use-After-Free (UAF) write vulnerability occurs in ClickDispatcher and TypeTool within the sandboxed renderer process. These classes dispatch user input events to the DOM using widget->HandleInputEvent(). This call synchronously executes the target page's JavaScript event listeners. If a malicious listener executes script to detach the RenderFrame hosting the actor (e.g., by removing an out-of-process iframe parent), the entire ownership chain—ChromeRenderFrameObserver -> ToolExecutor -> ClickTool/TypeTool—is synchronously destroyed.
When HandleInputEvent() returns, execution resumes in ClickDispatcher::DoMouseDown (or equivalent TypeTool functions) using a dangling this pointer. This leads to a deterministic heap write of the WebMouseEvent into freed memory, providing a powerful primitive for renderer Remote Code Execution (RCE).
Root Cause Analysis
In chrome/renderer/actor/click_dispatcher.cc, the DoMouseDown method initiates a click:
blink::WebInputEventResult result = widget->HandleInputEvent(
blink::WebCoalescedInputEvent(mouse_down, ui::LatencyInfo()));
// execution resumes here after synchronous JS
if (result == blink::WebInputEventResult::kHandledSuppressed) {
Finish(...);
return;
}
// UAF WRITE: copies ~136 bytes into the potentially freed tool allocation
mouse_up_event_ = mouse_down;
A similar pattern exists in TypeTool::SimulateKeyPress and TypeTool::CreateAndDispatchKeyEvent, where journal_ and task_id_ are accessed after the input dispatch.
Crucially, MiraclePtr (BackupRefPtr) does not mitigate this. ClickDispatcher is stored inline as a std::optional inside ClickTool. The only BRP-managed pointer to the ClickTool allocation is the raw_ref<const ToolBase> tool_ stored inside the ClickDispatcher. When the frame is detached, the ClickTool destructor is invoked, destroying the ClickDispatcher and its raw_ref. This drives the BRP reference count to zero before PartitionAlloc frees the chunk. The chunk is released immediately, skipping the BRP quarantine, allowing an attacker to reclaim it deterministically via a heap spray inside their synchronous JS listener.
Potential Reproduction Steps
- Setup a page with an A-B-A frame hierarchy (Top-A -> cross-origin iframe B -> same-process local-root iframe inner-A).
- Register a
mousedownlistener on an element in inner-A. - The attacker triggers the Glic Actor to click the element.
- When
DoMouseDowndispatches the event, the listener synchronously fires. - The listener executes
window.top.document.getElementById('b').remove();. - This synchronously detaches inner-A, destroying the
ChromeRenderFrameObserver,ToolExecutor, and theClickTool/ClickDispatcher. - The listener performs a heap spray to reclaim the freed
ClickToolmemory chunk. - The
widget->HandleInputEvent()call returns, andDoMouseDownexecutesmouse_up_event_ = mouse_down;, overwriting the reclaimed chunk with the attacker-influencedWebMouseEventstruct.
Proposed Fix
The affected dispatcher methods should use base::WeakPtr to check if the instance survived the synchronous HandleInputEvent call.
base::WeakPtr<ClickDispatcher> weak_this = weak_ptr_factory_.GetWeakPtr();
blink::WebInputEventResult result = widget->HandleInputEvent(
blink::WebCoalescedInputEvent(mouse_down, ui::LatencyInfo()));
if (!weak_this) {
return;
}
This pattern should be applied to ClickDispatcher::ClickDispatcher, ClickDispatcher::DoMouseDown, ClickDispatcher::DoMouseUpImpl, TypeTool::CreateAndDispatchKeyEvent, and KeyDispatcher::CreateAndDispatchKeyEvent.
Evaluated with Chrome root at commit: 3acbde3302da0cb19488c22c0eb007c791207b4b
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.
Raised in root component due to access or custom field issues on 1707859
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
The code calls HandleInputEvent synchronously, which can run JavaScript that destroys the tool object, and then continues to use the dangling this pointer without checking if the object still exists.
Impact
An attacker could deterministically write a WebMouseEvent into freed memory, providing a powerful primitive for renderer remote code execution, and this bypasses MiraclePtr.
What the attacker needed
Glic Actor feature enabled; Attacker controls page JavaScript; A-B-A frame hierarchy; Victim triggers actor click
The fix
The dispatcher methods should use base::WeakPtr to check if the instance survived the synchronous HandleInputEvent call before continuing.
How it was found
- Set up a page with an A-B-A frame hierarchy: top frame A, cross-origin iframe B, and same-process local-root iframe inner-A.
- Register a mousedown listener on an element in inner-A.
- Trigger the Glic Actor to click the element.
- The listener fires synchronously and removes the top frame's element with id 'b', detaching inner-A.
- This destroys the ChromeRenderFrameObserver, ToolExecutor, and ClickTool/ClickDispatcher.
- The listener performs a heap spray to reclaim the freed ClickTool memory chunk.
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 a piece of memory but keeps using it, like deleting a file and then writing to it. Here, clicking an element runs page JavaScript that removes the frame, which destroys the tool object while the click code is still running. When the click code continues, it writes into the now-freed memory, which an attacker could control.
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.