Use after free in Input (CVE-2026-10959)
A data race on a shared remote object in the input handling code allows a raw pointer to be used after the object is freed. An attacker could potentially exploit this use-after-free to achieve remote code execution in the sandboxed renderer process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 36 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 data race in WidgetInputHandlerManager allows unsynchronized access to a mojo::SharedRemote across the main and compositor threads. This race can lead to the compositor thread obtaining and using a dangling raw pointer while the main thread concurrently resets the connection. An attacker could potentially exploit this Use-After-Free to achieve remote code execution in the sandboxed renderer process.
Affected files:
third_party/blink/renderer/platform/widget/input/widget_input_handler_manager.ccthird_party/blink/renderer/platform/widget/input/widget_input_handler_manager.h
Estimated timestamp from git blame: 2025-06-27
Description
A data race exists in third_party/blink/renderer/platform/widget/input/widget_input_handler_manager.cc involving the viz_host_ member variable, which is a mojo::SharedRemote<mojom::blink::WidgetInputHandlerHost>.
While mojo::SharedRemote is safe to call from multiple threads, its underlying state is managed via a scoped_refptr, making concurrent reassignment and access of the same SharedRemote instance a data race. viz_host_ is mutated on the main thread (via SetVizHost) and the compositor thread (via OnVizHostDisconnected), and it is read from both threads (via GetVizWidgetInputHandlerHost()).
The most severe consequence occurs because GetVizWidgetInputHandlerHost() returns a raw pointer directly to the proxy object owned by the SharedRemote (return viz_host_.get();). If the SharedRemote is reset on another thread while a caller is holding this raw pointer, the underlying object is destroyed, leading to a Use-After-Free (UAF) upon virtual method dispatch.
BackupRefPtr (MiraclePtr) does not mitigate this vulnerability because SharedRemoteBase's internal scoped_refptr uses RAW_PTR_EXCLUSION, and the pointer returned to the caller is held as a standard C++ raw pointer.
Potential Attacker Steps
Note: These are suggested steps based on code analysis, as our tooling agent cannot execute a working proof of concept.
- The attacker loads a malicious webpage on a platform where
input::features::kInputOnVizis enabled (e.g., Android). - The attacker's JavaScript intentionally triggers a GPU process crash (e.g., via a WebGL resource exhaustion technique).
- The browser process recovers the GPU process and sends a new
viz_hostIPC to the renderer, resulting in the main thread executingWidgetInputHandlerManager::SetVizHost(). - Concurrently, the attacker synthesizes a gesture scroll event, which is processed by the renderer's compositor thread.
- The compositor thread executes
WidgetInputHandlerManager::DidStartScrollingViewport()and callsGetVizWidgetInputHandlerHost(). - The compositor thread extracts the raw pointer (
viz_host_.get()) just before being preempted by the OS scheduler. - The main thread executes
viz_host_.reset()insideSetVizHost(), destroying the underlying proxy object and freeing the memory. - The attacker's script, actively spraying the renderer heap, reclaims the freed proxy object's memory and overwrites it with a fake object containing a controlled vtable pointer.
- The compositor thread resumes and executes
viz_host->DidStartScrollingViewport(). The virtual dispatch uses the attacker's fake vtable, hijacking control flow and resulting in Remote Code Execution (RCE) in the renderer process.
Suggested Fix
- Introduce a
base::Lock(e.g.,viz_host_lock_) inWidgetInputHandlerManagerto synchronize all reads, assignments, and resets ofviz_host_. - Modify
GetVizWidgetInputHandlerHost()to return a copy of themojo::SharedRemoterather than a raw pointer to the underlying proxy. By returning a copy while under the lock, the reference count of the underlying state is safely incremented, ensuring the proxy object remains alive as long as the caller holds the copy.
Evaluated with Chrome root at commit: a1e33f5848218e21d4a16ae2c1bc94e815c30c7f
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 a missing lock around a shared remote object, allowing concurrent reset and raw pointer access.
What the attacker needed
Victim loads a malicious webpage; platform with kInputOnViz enabled; attacker can trigger GPU process crash
The fix
The fix should introduce a lock to synchronize access to the shared remote and return a copy instead of a raw pointer.
How it was found
- The attacker loads a malicious webpage on a platform where input::features::kInputOnViz is enabled.
- The attacker's JavaScript intentionally triggers a GPU process crash.
- The browser process recovers the GPU process and sends a new viz_host IPC to the renderer, causing the main thread to execute SetVizHost().
- Concurrently, the attacker synthesizes a gesture scroll event, processed by the compositor thread.
- The compositor thread calls GetVizWidgetInputHandlerHost() and extracts the raw pointer just before being preempted.
- The main thread executes viz_host_.reset() inside SetVizHost(), freeing the proxy object, and the attacker sprays the heap to reclaim and overwrite it.
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 keeps a pointer to memory after that memory has been freed, and then uses it. Here, two threads (main and compositor) access the same object without proper locking, so one thread can free it while the other still holds a pointer. An attacker who can control the freed memory could redirect execution to their own code.
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.