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

Use after free in Aura (CVE-2026-7919)

Methods in aura::Window iterate over child windows with raw iterators while firing observer callbacks; if a callback modifies the window hierarchy, the iterator is invalidated, causing an out-of-bounds read. An attacker could groom the heap to place a fake Window object and hijack a virtual call, leading to RCE and sandbox escape in the browser process.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 34 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 security team.

Overview: Methods in aura::Window iterate over child windows using raw iterators while firing observer callbacks. If a callback modifies the window hierarchy, such as ChromeOS transient window reparenting, the iterator is invalidated. This causes a potential out-of-bounds read on the vector's backing buffer, leading to a sandbox escape and RCE in the browser process.

Affected files:

  • ui/aura/window.cc

Estimated timestamp from git blame: 2025-08-19

Overview

There is a potential Out-Of-Bounds (OOB) read and Use-After-Free (UAF) vulnerability in the window hierarchy notification loops of aura::Window (ui/aura/window.cc). Methods like NotifyAddedToRootWindow, NotifyRemovingFromRootWindow, and NotifyWindowHierarchyChangeDown iterate over the children_ vector using a raw const_iterator while synchronously firing observer callbacks.

If an observer alters the window hierarchy during these loops (e.g., adding or removing a sibling window), the children_ vector is mutated, invalidating the iterator.

Vulnerability Details

In ChromeOS (Ash), a highly exploitable path exists via ash::WindowState::OnWindowAddedToRootWindow. When a window is moved across root windows (e.g., moving to a different display), NotifyAddedToRootWindow is called recursively. When the notification reaches a transient parent window, the WindowState observer triggers MoveAllTransientChildrenToNewRoot.

This function attempts to move the window's transient children to the new root window by finding the corresponding container ID. Because typical renderer-backed windows retain the default ID of -1 (kInitialId), the search dst_root->GetChildById(-1) incorrectly resolves to the first window with ID -1, which is typically the system's Wallpaper Window.

The logic then calls WallpaperWindow->AddChild(transient_child). If transient_child was a direct sibling of the transient parent, this reparenting implicitly calls RemoveChild on the parent whose children_ vector is currently being iterated.

When an element before the current iterator is removed from a std::vector, the remaining elements shift left and the vector's size decreases. The iterator now points to the new end(). At the end of the loop body, ++it increments the iterator past the new end(). The loop condition it != children_.end() evaluates to true, and the loop continues, dereferencing an out-of-bounds pointer.

Impact

The OOB read accesses adjacent heap memory outside the vector's backing buffer. An attacker can groom the heap to place a fake Window object in this space. The loop executes a virtual method call (*it)->NotifyAddedToRootWindow(), allowing the attacker to hijack control flow, resulting in potential Remote Code Execution (RCE) and Sandbox Escape in the highly privileged Browser process. BRP (MiraclePtr) does not mitigate this, as the UAF/OOB occurs on the vector's backing buffer, not the pointed-to object.

Potential Attacker Steps

Note: These are suggested/potential steps derived from code analysis; our tooling agent does not currently have the capability to run code or provide a working Proof of Concept.

  1. Setup: A compromised renderer creates an aura::Window hierarchy containing a parent (W_parent), a transient parent (Child1), and a transient child (W_transient).
  2. Stacking Manipulation: The attacker carefully orders the creation so that W_transient is located before Child1 in W_parent's children_ vector (e.g., by adding the transient child to the parent before the transient parent).
  3. Trigger Move: The attacker initiates a window move across root windows (e.g., via the Multi-Screen Window Placement API or a fullscreen transition).
  4. Iterator Invalidation: W_parent->NotifyAddedToRootWindow() begins iterating over its children. It skips W_transient (index 0) and processes Child1 (index 1).
  5. Reparenting: The observer for Child1 triggers MoveAllTransientChildrenToNewRoot, which incorrectly reparents W_transient to the Wallpaper Window due to the -1 ID clash.
  6. Exploitation: W_transient is erased from W_parent, shifting the vector. The iterator increments past the new end(), reads the attacker-groomed fake Window pointer from the heap, and executes a hijacked virtual call.

Suggested Fix

  1. Safe Iteration: Update NotifyAddedToRootWindow, NotifyRemovingFromRootWindow, and NotifyWindowHierarchyChangeDown in ui/aura/window.cc to use WindowTracker or iterate over a copy of the children_ vector. This pattern is already successfully utilized in NotifyWindowVisibilityChangedDown to prevent exactly this class of bug.
  2. Resolve ID Clash: Address the logic bug in MoveAllTransientChildrenToNewRoot (ash/wm/window_state.cc) so it correctly validates whether GetChildById is returning the intended parent container, particularly when dealing with the default -1 ID.

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 use of raw iterators over a mutable vector while synchronously invoking observer callbacks that can modify the vector.

Impact

The OOB read could allow an attacker to hijack control flow, resulting in potential RCE and sandbox escape in the browser process; BRP does not mitigate this.

What the attacker needed

Compromised renderer; ability to create window hierarchy; ability to trigger window move across roots

The fix

The code should be updated to use WindowTracker or iterate over a copy of the children_ vector, and the ID clash in MoveAllTransientChildrenToNewRoot should be resolved.

How it was found

  1. A compromised renderer creates a window hierarchy with a parent, a transient parent, and a transient child.
  2. The attacker orders creation so the transient child is before the transient parent in the parent's children vector.
  3. The attacker triggers a window move across root windows.
  4. The parent's NotifyAddedToRootWindow begins iterating over its children.
  5. The observer for the transient parent triggers MoveAllTransientChildrenToNewRoot, which reparents the transient child to the wallpaper window due to an ID clash.
  6. The transient child is erased from the parent, shifting the vector; the iterator increments past the new end, reads a groomed fake Window pointer, and executes a hijacked virtual call.

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 window manager keeps a list of child windows and notifies observers while looping over that list. If an observer changes the list during the loop, the loop's position marker becomes invalid and it can read past the end of the list. This can let an attacker control what the program reads next and potentially execute 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.