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

Use after free in SurfaceCapture (CVE-2026-10967)

A use-after-free vulnerability exists in the Android implementation of MouseCursorOverlayController during tab capture, where a dangling pointer to a freed ui::ViewAndroid object can be accessed after a renderer crash. An attacker could potentially exploit this to achieve arbitrary code execution in the browser process by grooming the heap and triggering mouse events.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 24 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 browser process on Android when a renderer crashes during a tab capture session. MouseCursorOverlayController::Observer retains a dangling raw pointer to a freed ui::ViewAndroid due to an edge case in process death notification ordering, which can be exploited via subsequent mouse events.

Affected files:

  • content/browser/media/capture/web_contents_frame_tracker.cc
  • content/browser/media/capture/mouse_cursor_overlay_controller_android.cc
  • content/browser/media/capture/web_contents_frame_tracker.h

Estimated timestamp from git blame: 2026-03-30

Summary

A Use-After-Free (UAF) vulnerability exists in the Android implementation of the MouseCursorOverlayController, used to render mouse cursors during media capture (e.g., tab sharing). The issue occurs because WebContentsFrameTracker fails to clear its associated MouseCursorOverlayController when a renderer process crashes. This failure is rooted in the specific ordering of RenderProcessHost observer notifications. As a result, the controller's observer maintains a dangling raw pointer to a ui::ViewAndroid object, leading to a UAF and potential arbitrary code execution in the browser process (Sandbox Escape) when subsequent mouse events occur.

Vulnerability Details

During a tab capture session, WebContentsFrameTracker instantiates a MouseCursorOverlayController. On Android, this controller creates an Observer that stores a gfx::NativeView (a raw ui::ViewAndroid*) to track mouse movements. Because it is an alias, this pointer is not protected by MiraclePtr (base::raw_ptr).

When a renderer crashes, RenderProcessHostImpl::ProcessDied iterates over its observers. SiteInstanceGroup is always registered as an observer before RenderViewHostImpl.

  1. Frame Deletion: SiteInstanceGroup::RenderProcessExited fires first, cascading to RenderFrameHostImpl::RenderProcessGone and triggering a RenderFrameDeleted notification.
  2. Early Return Bypass: WebContentsFrameTracker::RenderFrameDeleted catches this notification and calls OnPossibleTargetChange(), which evaluates GetCaptureTarget(). Because RenderViewHostImpl has not yet received the crash notification, RenderWidgetHostViewAndroid (and its ui::ViewAndroid) is still alive. SetTargetView is called, but because the ui::ViewAndroid pointer matches the existing target_native_view_, it returns early, bypassing the logic that would normally reset the MouseCursorOverlayController.
  3. View Destruction: The observer loop continues, notifying RenderViewHostImpl::RenderProcessExited, which destroys the RenderWidgetHostViewAndroid and deletes the ui::ViewAndroid. The MouseCursorOverlayController::Observer now holds a dangling pointer.
  4. UAF Trigger: If the user moves a physical mouse (or the attacker simulates mouse events), the surviving parent EventForwarder triggers Observer::OnMouseEvent. This calls controller_->OnMouseMoved, leading to UpdateOverlay. UpdateOverlay invokes GetCurrentCursorOrDefault() and ComputeRelativeBoundsForOverlay(), both of which execute the virtual method observer_->view()->GetDipScale() on the freed object.

If an attacker can successfully groom the browser process heap, this virtual method call provides a direct path to hijack the vtable and achieve arbitrary code execution.

Potential Reproduction Steps

Note: These steps are theoretical as our tooling does not execute code.

  1. An attacker tricks a user into visiting a malicious site on an Android device (e.g., a Chromebook running Android apps) and granting tab capture permissions (getDisplayMedia).
  2. The attacker's JavaScript initiates the capture, causing the browser to set up the MouseCursorOverlayController.
  3. The attacker intentionally triggers a renderer process crash (e.g., by exhausting memory).
  4. The attacker simultaneously simulates or induces mouse movement over the captured area.
  5. The browser process reads the dangling ui::ViewAndroid pointer, resulting in a UAF when GetDipScale() is called.

Suggested Fix

There are two primary ways to fix this:

  1. Adopt MiraclePtr: Change the gfx::NativeView view_ member in MouseCursorOverlayController::Observer to raw_ptr<ui::ViewAndroid>. This mirrors the Aura implementation (raw_ptr<aura::Window> window_) and would turn this exploitable UAF into a safe, non-exploitable crash.
  2. Explicit Cleanup: Ensure WebContentsFrameTracker or MouseCursorOverlayController actively listens for view destruction (e.g., by implementing ui::ViewAndroidObserver) so it can reset its internal pointers immediately upon view deletion, rather than relying on WebContentsObserver signals which are subject to subtle ordering bugs.

Evaluated with Chrome root at commit: eca8648a4e1cdfdda68c495a6003059fed641955


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 observer notification order during renderer process death causes WebContentsFrameTracker to skip resetting the MouseCursorOverlayController, leaving a dangling raw pointer to a destroyed ui::ViewAndroid.

Impact

If an attacker can groom the browser process heap, the virtual method call on the freed object could lead to vtable hijacking and arbitrary code execution, potentially escaping the sandbox.

What the attacker needed

Android device; victim grants tab capture; attacker triggers renderer crash; mouse movement over captured area

The fix

The fix should either change the raw pointer to a MiraclePtr (raw_ptr) or implement explicit cleanup by observing view destruction to reset pointers immediately.

How it was found

  1. An attacker tricks a user into visiting a malicious site on an Android device and granting tab capture permissions.
  2. The attacker's JavaScript initiates the capture, causing the browser to set up the MouseCursorOverlayController.
  3. The attacker intentionally triggers a renderer process crash.
  4. The attacker simultaneously simulates or induces mouse movement over the captured area.
  5. The browser process reads the dangling ui::ViewAndroid pointer, resulting in a UAF when GetDipScale() is called.

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 you share a tab on Android, the browser draws a mouse cursor overlay. If the page crashes, a pointer to the overlay's view is not cleared, so later mouse movements can access freed memory. This is called a use-after-free, and it can let an attacker run their own code in the browser.

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.