Skip to content
Memory corruption Advisory Advanced CVE-2026-11059

Use after free in Blink (CVE-2026-11059)

A use-after-free vulnerability in Blink's touch event handling allows a dangling pointer to be accessed after a nested event loop destroys the underlying object. An attacker could potentially achieve remote code execution in the renderer by exploiting this flaw.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 2 months

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 security team.

Overview: A potential Use-After-Free (UAF) vulnerability exists in WidgetBaseInputHandler::HandleTouchEvent when synchronous touch events trigger a nested event loop in JavaScript. During this nested loop, an unpausable IPC can destroy the WidgetBase, bypassing MiraclePtr protections. Upon returning from the loop, the dangling this pointer is accessed, potentially allowing Remote Code Execution (RCE) in the renderer.

Affected files:

  • third_party/blink/renderer/platform/widget/input/widget_base_input_handler.cc
  • third_party/blink/renderer/platform/widget/widget_base.h

Estimated timestamp from git blame: 2024-02-20

Summary

A potential Use-After-Free (UAF) vulnerability exists in WidgetBaseInputHandler::HandleTouchEvent that can lead to Remote Code Execution (RCE) in the renderer process. The issue occurs because touch events can trigger synchronous JavaScript execution, which may start a nested event loop. During this loop, specific unpausable IPCs can destroy the WidgetBase and its inline WidgetBaseInputHandler. When the nested loop exits, the function continues executing using a dangling this pointer.

Technical Details

In third_party/blink/renderer/platform/widget/input/widget_base_input_handler.cc, the HandleTouchEvent function iterates through touch points and synchronously dispatches them via widget_->client()->HandleInputEvent(). This call chain eventually reaches PointerEventManager::DispatchPointerEvent, which synchronously fires JavaScript event listeners (e.g., pointerdown).

If the JavaScript listener executes a function that spins a nested event loop (like window.print()), a ScopedPagePauser is instantiated to pause renderer tasks. However, the mojom::Frame::Delete IPC is bound to the kInternalNavigationAssociated task queue. This queue uses FreezableTaskQueueTraits where can_be_paused defaults to false. Consequently, if a parent frame removes the target iframe during the print() dialog, the Delete IPC is processed immediately inside the nested loop.

Processing Delete triggers RenderFrameImpl::Delete, which propagates down to WebFrameWidgetImpl::Close and calls widget_base_.reset(). This destroys the WidgetBase object.

MiraclePtr (BRP) Bypass

This UAF cleanly bypasses MiraclePtr (BackupRefPtr) protections. WidgetBaseInputHandler is defined as an inline value member of WidgetBase (WidgetBaseInputHandler input_handler_{this};). When WidgetBase is destroyed, input_handler_ is synchronously destroyed. The only raw_ptr<WidgetBase> protecting the allocation is widget_, which resides inside the input_handler_. Because the raw_ptr is destroyed, the BRP reference count for the WidgetBase allocation drops to 0, and the memory is freed directly to PartitionAlloc without quarantine.

When the nested loop exits, execution returns to HandleTouchEvent, which attempts to execute return widget_->client()->DispatchBufferedTouchEvents();. At this point, this is a dangling pointer, and reading this->widget_ accesses the freed (and potentially reallocated) memory.

Potential Attack Steps

Note: Our tooling agent cannot run code, so these are suggested, theoretical steps to trigger the vulnerability based on code analysis.

  1. An attacker creates a page with a cross-origin out-of-process iframe (OOPIF).
  2. Inside the OOPIF, the attacker registers a pointerdown JavaScript listener.
  3. The attacker induces a touch event directed at the OOPIF.
  4. The pointerdown listener executes synchronously and calls window.print(), spinning a nested event loop.
  5. Concurrently, the attacker's parent page removes the OOPIF from the DOM (iframe.remove()).
  6. The renderer processes the unpausable mojom::Frame::Delete IPC, freeing the WidgetBase.
  7. The attacker performs a PartitionAlloc heap spray matching the size of WidgetBase (e.g., using Web Workers or unpaused IPCs) to overwrite the freed memory with a fake vtable and spoofed client_ pointer.
  8. The print dialog is closed, returning execution to HandleTouchEvent.
  9. The code calls widget_->client()->DispatchBufferedTouchEvents(), hijacking control flow via the sprayed fake vtable to achieve renderer RCE.

Suggested Fix

The WidgetBaseInputHandler::HandleTouchEvent method needs to verify that it has not been destroyed during the synchronous event dispatch before it accesses this or widget_ again.

Similar to how HandleInputEvent manages its lifetime, HandleTouchEvent should capture a base::WeakPtr to itself before dispatching events. Before the final call to DispatchBufferedTouchEvents(), it must check if the WeakPtr is still valid:

C++
base::WeakPtr<WidgetBaseInputHandler> weak_this = weak_ptr_factory_.GetWeakPtr();
// ... loop dispatching events ...
if (!weak_this) {
  return WebInputEventResult::kNotHandled;
}
return widget_->client()->DispatchBufferedTouchEvents();

Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 HandleTouchEvent function does not check whether the WidgetBase object has been destroyed during synchronous event dispatch, leading to use of a dangling pointer.

Impact

A successful exploit could allow remote code execution in the renderer process, though the report notes this is a potential vulnerability and the attack steps are theoretical.

What the attacker needed

Victim visits a malicious page; browser supports touch events; attacker can trigger print dialog

The fix

The fix should capture a WeakPtr to the handler before dispatching events and check its validity before accessing the widget.

How it was found

  1. Create a page with a cross-origin out-of-process iframe (OOPIF).
  2. Inside the OOPIF, register a pointerdown JavaScript listener.
  3. Induce a touch event directed at the OOPIF.
  4. The pointerdown listener calls window.print(), spinning a nested event loop.
  5. Concurrently, the parent page removes the OOPIF from the DOM.
  6. The renderer processes the unpausable Delete IPC, freeing the WidgetBase.

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.

This report describes a memory safety bug in a web browser's rendering engine. When a touch event triggers JavaScript that opens a print dialog, the browser can free an object that is still being used, leading to a crash or potentially allowing an attacker to run malicious 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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.