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

Use after free in Accessibility (CVE-2026-9905)

A race condition between COM's fast rundown on an RPC thread and UI thread mutations to the global AXTreeManagerMap causes a use-after-free on the map's backing array. A compromised renderer could exploit this to achieve arbitrary memory corruption and potentially escape the sandbox.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 56 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: A race condition exists between COM's IFastRundown mechanism on an RPC thread and UI thread mutations to the process-global AXTreeManagerMap. This leads to a Use-After-Free (UAF) on the map's backing array, bypassing MiraclePtr (BRP) and allowing a compromised renderer to achieve arbitrary memory corruption and potential sandbox escape.

Affected files:

  • ui/accessibility/platform/ax_platform_node_textrangeprovider_win.cc
  • ui/accessibility/ax_tree_manager_map.h
  • ui/accessibility/ax_tree_manager_map.cc
  • ui/accessibility/platform/sequence_affine_com_object_root_win.h
  • ui/accessibility/ax_tree_manager.cc
  • ui/accessibility/ax_tree_manager.h

Estimated timestamp from git blame: 2023-06-23

Background

AXPlatformNodeTextRangeProviderWin is a COM class used to provide text range information to UI Automation (UIA) clients on Windows. It inherits from SequenceAffineComObjectRoot and CComSingleThreadModel, indicating it is designed to run on the UI thread (an STA). To reduce latency during out-of-process client crashes, it implements IFastRundown.

The Vulnerability

When an out-of-process UIA client terminates abruptly, the COM runtime initiates a fast rundown. Because IFastRundown is implemented, COM bypasses STA marshaling and calls Release() directly on an RPC dispatch thread.

SequenceAffineComObjectRoot::InternalRelease() asserts it is on the correct sequence via DCHECK_CALLED_ON_VALID_SEQUENCE. However, because DCHECKs are removed in release builds, the sequence violation is ignored, and the object is destroyed on the RPC thread.

During destruction, ~TextRangeEndpoints() sets its start and end positions to null sequentially:

  1. SetStart(null) sets start_ to AXTreeIDUnknown().
  2. SetEnd(null) evaluates whether to call RemoveObserver(end_->tree_id()). The check end_->tree_id() != start_->tree_id() evaluates to true because start_ was just nulled. This erroneously triggers RemoveObserver for the end_ tree ID on the RPC thread.

RemoveObserver calls AXTreeManager::FromID(), which accesses the process-global, unsynchronized AXTreeManagerMap (an absl::flat_hash_map<AXTreeID, raw_ptr<AXTreeManager>>).

The Race Condition and BRP Bypass

Concurrently, a compromised renderer can rapidly create and destroy <iframe> elements, forcing the browser to insert and remove entries in the AXTreeManagerMap on the UI thread. This causes the absl::flat_hash_map to frequently rehash, allocating new backing slot arrays and freeing old ones.

If the RPC thread executes map_.find() while the UI thread is rehashing the map, the RPC thread will read from a freed slot array.

Crucially, MiraclePtr (BRP) does not prevent exploitation here. The UAF occurs on the container's backing array (which holds the raw_ptr bytes), not the AXTreeManager object itself. An attacker can reclaim the freed slot array and directly overwrite the 8 bytes of the raw_ptr, bypassing BRP quarantine entirely.

Exploitation Primitive

The attacker controls the pointer returned by GetManager. The code proceeds to call ax_tree_manager->ax_tree()->RemoveObserver(this); using the fake AXTreeManager. This invokes ObserverList::RemoveObserver on an attacker-controlled fake AXTree object.

By carefully crafting the fake ObserverList memory structure (e.g., controlling observers_ vector pointers and the live_iterators_ linked list), the attacker can force ObserverList to execute it->MarkForRemoval() or observers_.erase(it) on arbitrary addresses. This provides powerful arbitrary decrement, arbitrary null-write, or arbitrary memory move primitives, which can be leveraged to hijack control flow and escape the sandbox.

Potential Attacker Steps

Note: These steps are theoretical, as our tooling agent cannot execute code.

  1. Compromise a renderer process.
  2. Execute a loop rapidly creating and destroying iframes to trigger UI thread map mutations and rehashes.
  3. Spray the browser heap to reclaim freed absl::flat_hash_map backing arrays with fake raw_ptr<AXTreeManager> entries.
  4. Induce a crash in an out-of-process UIA client to trigger COM fast rundown on the RPC thread.
  5. The RPC thread reads the attacker's fake pointer and accesses a fake AXTree.
  6. Use the ObserverList::RemoveObserver primitive to corrupt a function pointer and execute arbitrary shellcode.

Suggested Fix

  1. Remove IFastRundown: The safest fix is to remove IFastRundown from AXPlatformNodeTextRangeProviderWin. If an object is strictly tied to an STA (UI thread), it must be cleaned up on that thread, even if it delays rundown.
  2. Enforce Sequence Checks: Upgrade the DCHECK in SequenceAffineComObjectRoot to a CHECK to ensure COM objects are never destroyed off-sequence in release builds.
  3. Thread-Safe Map: If cross-thread access to AXTreeManagerMap is truly required, synchronize access using an absl::Mutex or base locking mechanism.

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 combination of IFastRundown allowing off-thread destruction, a DCHECK that is removed in release builds, and an unsynchronised global map accessed from two threads.

Impact

A compromised renderer could achieve arbitrary memory corruption and potentially escape the sandbox, though the report notes the steps are theoretical and not executed.

What the attacker needed

Compromised renderer process; out-of-process UIA client crash; Windows platform

The fix

The report suggests removing IFastRundown, upgrading the DCHECK to a CHECK, and synchronising access to AXTreeManagerMap; it does not state that a fix was applied.

How it was found

  1. Compromise a renderer process.
  2. Execute a loop rapidly creating and destroying iframes to trigger UI thread map mutations and rehashes.
  3. Spray the browser heap to reclaim freed absl::flat_hash_map backing arrays with fake raw_ptr<AXTreeManager> entries.
  4. Induce a crash in an out-of-process UIA client to trigger COM fast rundown on the RPC thread.
  5. The RPC thread reads the attacker's fake pointer and accesses a fake AXTree.
  6. Use the ObserverList::RemoveObserver primitive to corrupt a function pointer and execute arbitrary shellcode.

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 happens when a program frees memory but then keeps using it, letting an attacker control what's there. Here, a timing problem between two threads lets a malicious webpage (running in a compromised renderer) trick the browser into using freed memory, which could let the attacker run their own code and break out of the browser's security 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.

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.