Type Confusion in Accessibility (CVE-2026-7914)
A stale accessibility cache in the browser process can retain a destroyed iframe's unique ID, and by rapidly churning the 32-bit ID counter to wrap around, an attacker can reassign that ID to a different type of accessibility node. An unchecked downcast then produces an out-of-bounds pointer that is passed to the OS COM layer, potentially leading to a sandbox escape and remote code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 35 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 potential type confusion vulnerability exists in the browser process due to a stale accessibility cache when an iframe is destroyed. By rapidly churning the 32-bit AXUniqueId counter to wrap around, an attacker can reassign a stale ID to a smaller, unrelated accessibility node. An unchecked downcast in BrowserAccessibilityComWin::get_hyperlink then adds an offset to this object, yielding an out-of-bounds pointer that is dereferenced by the OS COM layer, potentially leading to a sandbox escape.
Affected files:
ui/accessibility/platform/browser_accessibility_com_win.ccui/accessibility/ax_unique_id.ccui/accessibility/platform/ax_platform_node_base.ccui/accessibility/ax_tree_manager.cccontent/browser/renderer_host/render_frame_host_impl.cc
Estimated timestamp from git blame: 2022-10-28
Summary
A type confusion vulnerability in the Windows-specific accessibility implementation can potentially allow a compromised renderer to hijack control flow in the browser process. The issue occurs in BrowserAccessibilityComWin::get_hyperlink, which performs an unchecked downcast on an object retrieved from a process-wide map using a stale unique ID. By driving the 32-bit AXUniqueId counter to wrap around, an attacker can cause a stale ID (formerly associated with a child document) to be reassigned to a different object type, such as a Views-based accessibility node. Subsequent COM method calls on the confused object lead to out-of-bounds memory access and potential arbitrary code execution.
Vulnerability Details
1. Stale Cache Mechanism
In BrowserAccessibilityComWin::get_hyperlink(), an AXPlatformNode* is retrieved from a process-wide UniqueIdMap using a cached unique ID. For iframe nodes, this ID is populated by traversing into the child document during AXPlatformNodeBase::UpdateComputedHypertext.
When a child frame is destroyed or navigated, RenderFrameHostImpl::~RenderFrameHostImpl() calls DetachFromParentManager(), which sets connected_to_parent_tree_node_ to false. Consequently, during AXTreeManager::~AXTreeManager(), the logic early-returns if connected_to_parent_tree_node_ is false, bypassing the call to UpdateAttributesOnParent. This prevents the parent iframe's hypertext cache from being invalidated or refreshed, leaving it with a stale reference to the destroyed child root's unique ID.
2. AXUniqueId Wraparound
The AXUniqueId system uses a 32-bit counter (int32_t) that wraps around at INT32_MAX. While a high number of allocations is required (~2^31), a compromised renderer can accelerate this process through rapid DOM churn (e.g., repeatedly creating and deleting nodes). In a long-running session, the counter can wrap, allowing a previously released ID to be reassigned to a new, unrelated accessibility node—such as an AXPlatformNodeWin created for a UI View.
3. Type Confusion and Out-of-Bounds Access
When get_hyperlink is called on an iframe with a stale ID that has been reassigned to a Views-based AXPlatformNodeWin:
AXPlatformNodeWin::GetFromUniqueId(stale_id)returns the newAXPlatformNodeWin*object.- The code performs an unchecked
static_cast<BrowserAccessibilityComWin*>(node). This is a type confusion because the object is actually a plainAXPlatformNodeWin(used for Views), which does not implement theBrowserAccessibilityComWininterface. - The code then performs
static_cast<IAccessibleHyperlink*>(link->NewReference()). SinceIAccessibleHyperlinkis a base class ofBrowserAccessibilityComWinbut not of the originalAXPlatformNodeWin, this cast adds an offset (typicallysizeof(AXPlatformNodeWin) + 8) to the pointer. - The resulting pointer physically points past the end of the
AXPlatformNodeWinallocation, into adjacent heap memory (e.g., PartitionAlloc metadata or an adjacent object).
Notably, the check if(!link) following the cast is ineffective as static_cast will not return null for a non-null input even if the type is incorrect.
Potential Exploitation Steps
Note: These are potential steps; we currently do not have a working proof of concept that has been successfully run.
- Setup: The victim is running Chrome on Windows with an Assistive Technology (AT) active. An attacker controls a compromised renderer page containing an iframe.
- Cache Initialization: The AT polls the accessibility tree, causing the parent iframe node to cache the child document's
AXUniqueIdin itshypertext_.hyperlinksarray. - Frame Destruction: The attacker's JavaScript destroys the iframe. Due to the early return in
AXTreeManager::~AXTreeManager, the parent's cache is not invalidated. - Counter Wraparound: The attacker's JavaScript rapidly creates and destroys millions of DOM nodes, causing the
AXUniqueIdcounter to increment until it reachesINT32_MAXand wraps around back to the stale ID. - Heap Grooming: The attacker creates controlled allocations (e.g., using Mojo blobs) in the browser process heap, filled with fake vtable pointers, adjacent to where new accessibility nodes will be allocated.
- ID Reassignment: The attacker triggers a browser UI action (e.g.,
window.print()) that allocates a new nativeAXPlatformNodeWin. This new node is assigned the wrapped-around stale ID. - Trigger Type Confusion: The AT queries the parent iframe node by calling
get_hyperlink. The browser looks up the stale ID, retrieves the newly allocated UI node, and performs the unchecked downcast and pointer offset. - Arbitrary Code Execution: The out-of-bounds pointer is returned to the OS COM layer. When the COM layer dereferences this pointer to call a method, it reads the vtable pointer from the attacker-controlled blob, leading to an indirect call to an attacker-controlled address and a browser process sandbox escape.
Impact
This vulnerability provides a primitive that can be leveraged for Remote Code Execution (RCE) in the unsandboxed Browser Process. It is not protected by MiraclePtr (BRP) because the issue involves an arithmetic offset on a live object rather than a Use-After-Free, and raw pointers are passed to the OS COM layer.
Suggested Fix
There are two primary areas that require fixing:
- Cache Invalidation: Ensure that when
RenderFrameHostImpldestroys a child frame'sBrowserAccessibilityManager, the parent node's cache is properly invalidated. The early return inAXTreeManager::ParentConnectionChangedwhenparentis null needs to be addressed, potentially by maintaining a persistent reference or identifying an alternative way to triggerUpdateAttributesOnParentbefore the manager is fully detached. - Safe Casting: In
BrowserAccessibilityComWin::get_hyperlink, replace thestatic_castwith a safe cast or a type check. Before casting the retrievedAXPlatformNodetoBrowserAccessibilityComWin, verify its role, class type, or delegate to ensure it is actually an instance ofBrowserAccessibilityComWinand not a plainAXPlatformNodeWin.
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.
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 parent iframe's hypertext cache is not invalidated when a child frame is destroyed because an early return in the accessibility tree manager skips the update, and the subsequent lookup uses an unchecked static_cast on a stale unique ID.
Impact
This could allow a compromised renderer to achieve remote code execution in the unsandboxed browser process, though the report notes that no working proof of concept has been successfully run.
What the attacker needed
Chrome on Windows; Assistive Technology active; Attacker controls a renderer page; Victim visits attacker page
The fix
The cache should be invalidated when a child frame is destroyed, and the unchecked static_cast should be replaced with a safe cast or type check.
How it was found
- The victim runs Chrome on Windows with an Assistive Technology active, and the attacker controls a page with an iframe.
- The Assistive Technology polls the accessibility tree, causing the parent iframe node to cache the child document's unique ID.
- The attacker's JavaScript destroys the iframe, but the parent's cache is not invalidated due to an early return in the tree manager destructor.
- The attacker's JavaScript rapidly creates and destroys millions of DOM nodes to wrap the 32-bit unique ID counter around to the stale ID.
- The attacker grooms the heap with controlled allocations and triggers a browser UI action that allocates a new native accessibility node, which receives the wrapped-around stale ID.
- The Assistive Technology queries the parent iframe node, causing the browser to look up the stale ID, retrieve the new node, and perform an unchecked downcast that yields an out-of-bounds pointer passed to the OS COM layer.
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 bug in how a web browser (Chrome on Windows) keeps track of accessibility features, which help people with disabilities use the browser. When a part of a web page is removed, the browser sometimes keeps an old reference to it. If an attacker can make the browser reuse that reference for a different kind of object, the browser can get confused and access memory it shouldn't, which could let the attacker run their own code on the computer.
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.