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

Use after free in Input (CVE-2026-17688)

A use-after-free was reported in the macOS (and potentially iOS) touch-event handling code, where a synchronous gesture dispatch can destroy the view and the code then dereferences the freed object. An attacker who already controls a renderer process could potentially groom the heap and hijack a virtual call in the browser process, though no dynamic proof of concept was produced.

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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.

Overview: A potential use-after-free (UAF) vulnerability exists in RenderWidgetHostViewMac due to synchronous destruction during gesture dispatch. When processing an acked touch event, the view triggers synchronous gesture dispatch which can result in the view's destruction, leading to a freed 'this' pointer dereference immediately afterwards. This pattern is structurally identical to a vulnerability previously fixed in RenderWidgetHostViewAura but is missing on macOS and iOS.

Affected files:

  • content/browser/renderer_host/render_widget_host_view_mac.mm

Estimated timestamp from git blame: 2018-05-07

Root Cause

In RenderWidgetHostViewMac::ProcessAckedTouchEvent, the method invokes gesture_provider_.OnTouchEventAck(...), which triggers synchronous gesture synthesis and dispatch. This re-entrant flow can reach arbitrary observers or delegate hooks, allowing synchronous destruction of the page/tab and the corresponding RenderWidgetHostViewMac instance.

Upon returning from the synchronous dispatch call, ProcessAckedTouchEvent proceeds to dereference this to access host() without any liveness checks:

C++
// content/browser/renderer_host/render_widget_host_view_mac.mm
void RenderWidgetHostViewMac::ProcessAckedTouchEvent(
    const input::TouchEventWithLatencyInfo& touch,
    blink::mojom::InputEventResultState ack_result) {
  const bool event_consumed =
      ack_result == blink::mojom::InputEventResultState::kConsumed;
  gesture_provider_.OnTouchEventAck(                               // Synchronous dispatch
      touch.event.unique_touch_event_id, event_consumed,
      input::InputEventResultStateIsSetBlocking(ack_result));
  if (touch.event.touch_start_or_first_touch_move && event_consumed &&
      host()->delegate() && host()->delegate()->GetInputEventRouter()) { // Reads this->host_ from freed *this
    host()
        ->delegate()
        ->GetInputEventRouter()
        ->OnHandledTouchStartOrFirstTouchMove(
            touch.event.unique_touch_event_id);
  }
}

If the view has been destroyed during the gesture ack processing, dereferencing this to load this->host_ reads from freed memory, resulting in a use-after-free.

This pattern is structurally identical to a vulnerability that was previously fixed in the Aura implementation (RenderWidgetHostViewAura::ProcessAckedTouchEvent) by adding a WeakPtr liveness check. While RenderWidgetHostViewMac possesses a weak_factory_, it is not utilized in this method.

This same pattern also potentially exists in the iOS view implementation (RenderWidgetHostViewIOS::ProcessAckedTouchEvent) at content/browser/renderer_host/render_widget_host_view_ios.mm.

Potential Synchronous Destruction Flow

Based on static analysis, the re-entrant path executes as follows:

  1. FilteredGestureProvider::OnTouchEventAck is called from RenderWidgetHostViewMac::ProcessAckedTouchEvent.
  2. This invokes TouchDispositionGestureFilter::OnTouchEventAck -> SendAckedEvents -> FilterAndSendPacket -> SendGesture.
  3. This delegates to FilteredGestureProvider::ForwardGestureEvent -> client_->OnGestureEvent.
  4. client_ points to the RenderWidgetHostViewMac instance. RenderWidgetHostViewMac::OnGestureEvent is invoked and forwards the gesture via host()->GetRenderInputRouter()->ForwardGestureEventWithLatencyInfo(...) or through the input event router.
  5. On specific gesture-consumed or touch-action-filtered branches, InputRouterImpl::SendGestureEvent synchronously calls disposition_handler_->OnGestureEventAck(...) -> RenderInputRouter::OnGestureEventAck -> delegate_->NotifyObserversOfInputEventAcks(...).
  6. This notifies observers registered on RenderWidgetHostImpl.
  7. If an observer (such as an embedder hook) closes the page synchronously in response to the gesture ack, it initiates RenderWidgetHostImpl::Destroy(true) -> view_->Destroy() -> RenderWidgetHostViewMac::Destroy(), which executes delete this;.
  8. Once the stack unwinds back to RenderWidgetHostViewMac::ProcessAckedTouchEvent, this has been deleted, and host() resolves to an invalid load from freed memory.

Note: These are potential steps based on static analysis, as our tooling does not currently have the capability to run a dynamic proof of concept.

Security Impact

  • Heap Grooming and Hijacking: An attacker who has achieved remote code execution inside the renderer (or controls a progressive web app/app-shim process) can trigger synthetic touch events. If they can groom the browser process heap and reclaim the freed RenderWidgetHostViewMac allocation before host() is evaluated, this can lead to a chained virtual-call hijack (->delegate() ->GetInputEventRouter()) within the unsandboxed browser process.
  • MiraclePtr Status: This is not protected by MiraclePtr (BackupRefPtr) because the dangling reference is the implicit stack-allocated this pointer (a bare C++ pointer) pointing to a freed allocation. The raw storage representing this->host_ is retrieved directly from the deallocated heap memory after the RenderWidgetHostViewMac destructor has already executed.

Suggested Fix

Guard the remaining instructions in ProcessAckedTouchEvent using the view's weak pointer factory, mirroring the fix implemented in Aura:

C++
// content/browser/renderer_host/render_widget_host_view_mac.mm
void RenderWidgetHostViewMac::ProcessAckedTouchEvent(
    const input::TouchEventWithLatencyInfo& touch,
    blink::mojom::InputEventResultState ack_result) {
  const bool event_consumed =
      ack_result == blink::mojom::InputEventResultState::kConsumed;
  auto weak_this = weak_factory_.GetWeakPtr();
  gesture_provider_.OnTouchEventAck(
      touch.event.unique_touch_event_id, event_consumed,
      input::InputEventResultStateIsSetBlocking(ack_result));
  if (!weak_this) {
    return;
  }
  if (touch.event.touch_start_or_first_touch_move && event_consumed &&
      host()->delegate() && host()->delegate()->GetInputEventRouter()) {
    host()
        ->delegate()
        ->GetInputEventRouter()
        ->OnHandledTouchStartOrFirstTouchMove(
            touch.event.unique_touch_event_id);
  }
}

A similar weak pointer liveness check should also be added to RenderWidgetHostViewIOS::ProcessAckedTouchEvent.

Evaluated with Chrome root at commit: b1520ef4a76878853a31f0943b565e42060edec8


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.

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 method calls into gesture dispatch synchronously without a liveness check, so a re-entrant destruction leaves a dangling 'this' pointer that is dereferenced afterwards.

Impact

An attacker who already has code execution in the renderer could potentially groom the heap and hijack a virtual call in the browser process, but this is based on static analysis only and no working exploit was demonstrated.

What the attacker needed

Attacker already controls a renderer process; ability to trigger synthetic touch events; heap grooming to reclaim the freed object

The fix

The remaining code should be guarded with the view's weak pointer factory, mirroring the fix already applied in the Aura implementation, and the same check should be added on iOS.

How it was found

  1. A touch event is acknowledged and ProcessAckedTouchEvent calls into the gesture provider.
  2. Gesture synthesis and dispatch run synchronously and reach observers or delegate hooks.
  3. An observer closes the page, destroying the view and deleting the object.
  4. Control returns to ProcessAckedTouchEvent, which dereferences the freed 'this' pointer.

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.

When a touch event is acknowledged, the browser asks a gesture helper to process it, and that helper can run code that closes the tab. The code then keeps using the object it was called on, even though that object has just been deleted, so it reads memory that no longer belongs to it. This kind of mistake is called a use-after-free and can let an attacker influence what happens next.

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.