Use after free in Input (CVE-2026-9997)
A use-after-free was identified in the browser process when a renderer acknowledges a touch event as consumed, because the synchronous gesture dispatch that follows can destroy the view object while it is still on the stack. A compromised renderer could potentially use this to run code in the unsandboxed browser process, escaping the sandbox.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 14 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 vulnerability exists in the browser process when handling touch event acknowledgments in Aura-based environments. A compromised renderer can trigger synchronous object destruction during gesture dispatch, leading to a memory safety violation when the view is accessed after deletion. This could potentially lead to a sandbox escape on Windows, Linux, and ChromeOS.
Affected files:
content/browser/renderer_host/render_widget_host_view_aura.cccontent/browser/renderer_host/render_widget_host_view_base.h
Estimated timestamp from git blame: 2024-06-06
Technical Analysis
A potential Use-After-Free (UAF) has been identified in RenderWidgetHostViewAura::ProcessAckedTouchEvent in content/browser/renderer_host/render_widget_host_view_aura.cc. The vulnerability occurs when a touch event acknowledgment (ACK) from the renderer triggers synchronous gesture dispatch, which in turn leads to the destruction of the RenderWidgetHostViewAura object while it is still being processed on the stack.
In ProcessAckedTouchEvent, the following call occurs:
// content/browser/renderer_host/render_widget_host_view_aura.cc:1335
window_host->dispatcher()->ProcessedTouchEvent(
touch.event.unique_touch_event_id, window_, result,
input::InputEventResultStateIsSetBlocking(ack_result));
if (touch.event.touch_start_or_first_touch_move &&
result == ui::ER_HANDLED && host()->delegate() && // Potential UAF
host()->delegate()->GetInputEventRouter()) { // Potential UAF
When a renderer ACKs a touch event as 'consumed' (ui::ER_HANDLED), aura::WindowEventDispatcher::ProcessedTouchEvent dispatches generated gestures synchronously. On desktop platforms, if kEnableGestureBeginEndTypes is enabled, a kGestureBegin event is dispatched.
This synchronous dispatch chain can reach wm::FocusController, which may trigger window activation or focus changes. Observers of these changes (such as a 'dismiss-on-blur' UI element or tab closure logic) can synchronously destroy the WebContents, which in turn destroys the RenderWidgetHostViewAura.
Because RenderWidgetHostViewAura implements aura::WindowDelegate, its destruction often goes through OnWindowDestroyed, which calls delete this;. When the synchronous stack unwinds back to ProcessAckedTouchEvent, the code continues to execute at line 1339, dereferencing this (via the host() helper) after it has been freed. Since this is a bare C++ pointer, MiraclePtr (BRP) does not protect this specific access to the object's member fields.
Suggested steps to reproduce (Potential)
- Compromise a renderer process to control input event ACKs.
- Trigger a touch start event in a context where a focus change would cause the associated view to be destroyed (e.g., a popup window or a specific tab configuration).
- Have the renderer send a 'Consumed' ACK for the
touchstartevent. - The browser dispatches a synchronous
kGestureBeginevent, triggers the focus-based destruction, and subsequently accesses the freed view object inProcessAckedTouchEvent.
Impact
An attacker capable of compromising the renderer process could potentially exploit this UAF to achieve arbitrary code execution in the browser process. As the browser process is unsandboxed, this represents a sandbox escape.
Suggested Fix
The call to ProcessedTouchEvent should be guarded by a base::WeakPtr check. Since RenderWidgetHostViewAura inherits from RenderWidgetHostViewBase, which provides a base::WeakPtrFactory, a liveness check should be performed immediately after the synchronous call returns.
auto weak_ptr = base::AsWeakPtr<RenderWidgetHostViewBase>(this);
window_host->dispatcher()->ProcessedTouchEvent(...);
if (!weak_ptr)
return;
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
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 the code calls into gesture dispatch synchronously and then dereferences its own object without checking it is still alive, even though that call can destroy the object.
Impact
An attacker who has already compromised the renderer could potentially achieve arbitrary code execution in the unsandboxed browser process, which would be a sandbox escape.
What the attacker needed
Compromised renderer process; touch input with gesture begin enabled; focus change destroys the view
The fix
The call should be guarded by a weak pointer liveness check performed immediately after the synchronous call returns.
How it was found
- Compromise a renderer process so it controls input event acknowledgements.
- Trigger a touch start where a focus change would destroy the associated view.
- Send a consumed acknowledgement for the touch start event.
- The browser dispatches a synchronous gesture begin event, focus-based destruction happens, and the freed view is accessed.
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 is when a program frees an object's memory but then keeps using it, so the data there can be replaced with something an attacker controls. Here, the browser handles a touch acknowledgement from a web page's process, and during that handling something else can close the window and delete the object. The code then reads the deleted object, which a malicious page process could exploit to run its own code outside the sandbox.
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.