Use after free in Accessibility (CVE-2026-8557)
The extension renderer's AutomationAXTreeWrapper fails to reset its internal AXTree when Unserialize fails, allowing a compromised content renderer to poison the tree's node map with an invalid child ID. A subsequent update for the same tree ID causes a collision during node creation, resulting in a persistent use-after-free that bypasses MiraclePtr.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 28 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 go/chrome-ai-generated-security-bugs-faq for more information.
Overview: The extension renderer's AutomationAXTreeWrapper fails to reset its internal AXTree when Unserialize fails. A compromised content renderer can send an update referencing child ID 0, poisoning the tree's internal map. A subsequent update for the same tree ID causes a collision during node creation, resulting in a persistent Use-After-Free that bypasses MiraclePtr.
Affected files:
ui/accessibility/platform/automation/automation_ax_tree_wrapper.ccui/accessibility/ax_tree.ccui/accessibility/platform/automation/automation_tree_manager_owner.cc
Estimated timestamp from git blame: 2025-06-25
Summary
A potential Use-After-Free (UAF) vulnerability exists in the extension renderer process due to improper state management in AutomationAXTreeWrapper. When an accessibility tree update fails to unserialize, the wrapper maintains its corrupted AXTree state instead of resetting it. An attacker can exploit this by poisoning the tree's node map to cause an ID collision on a subsequent update. This collision causes node creation to fail, returning a dangling pointer that is then stored persistently in the tree structure. This vulnerability bypasses MiraclePtr mitigations.
Prerequisites
This vulnerability requires an active extension utilizing the chrome.automation API (e.g., ChromeVox or Select-to-Speak on ChromeOS).
When an extension uses this API, the browser sets the accessibility mode to kAXModeWebContentsOnly, which lacks the kNativeAPIs flag. Consequently, the browser_accessibility_manager_ in the Browser process remains null. This architectural quirk causes the Browser to skip running AXTree::Unserialize during RenderFrameHostImpl::SendAccessibilityEventsToManager, effectively forwarding malicious accessibility updates from a compromised content renderer directly to the extension renderer without native validation.
Potential Exploitation Steps
(Note: These are suggested steps based on source code analysis; a working proof-of-concept has not been executed).
1. Poisoning Phase
A compromised content renderer sends an AXTreeUpdate where a node (e.g., ID 1) includes a child with ID 0 (kInvalidAXNodeID).
- During
AXTree::Unserialize,GetFromId(0)is called. Because 0 is hardcoded as invalid,GetFromIdexplicitly returnsnullptrwithout checking theid_map_. - Assuming node 0 is new, the code calls
CreateNode(0). In official production builds,SANITIZER_CHECK(id != kInvalidAXNodeID)resolves to a no-opDCHECK. CreateNode(0)successfully inserts the newly allocated node into the tree'sid_map_viatry_emplace(0, ...).- The update eventually fails validation (e.g., in
ValidatePendingChangesComplete) because no data was provided for node 0. Unserializereturnsfalse. However,AutomationAXTreeWrapper::OnAccessibilityEventsreturns without clearing or resetting theax_tree_. The tree remains poisoned with ID 0 inid_map_.
2. Collision and UAF Phase
The attacker sends a second AXTreeUpdate for the same tree_id, again referencing child ID 0.
Unserializeis called on the poisoned tree.CreateNewChildVectorcallsGetFromId(0). It still explicitly returnsnullptr, forcing the code to callCreateNode(0)again.- Inside
CreateNode(0), a newAXNodeis allocated in astd::unique_ptr. id_map_.try_emplace(0, ...)is called. This time, the call fails because ID 0 is already present in the map from the first update.- Because insertion fails, the
unique_ptris not moved. The function returns the raw pointer (node_raw) to the newly created node. - The
unique_ptrgoes out of scope and theAXNodeis destroyed, leavingnode_rawas a dangling pointer. - In
CreateNewChildVector,update_state->pending_node_ids.insert(child->id());executes, immediately dereferencing the dangling pointer to readdata_.id. new_children->push_back(child)constructs araw_ptrfrom the dangling pointer.UpdateNodecallsnode->SwapChildren(&new_children), persistently storing the dangling pointer in the parent node'schildren_array.
MiraclePtr Bypass
This flow bypasses MiraclePtr (BackupRefPtr). At the time the AXNode is destroyed in CreateNode, it is exclusively owned by a std::unique_ptr and has no active raw_ptr references. Therefore, PartitionAlloc's BRP refcount is 0, and the memory is freed immediately without quarantine. When new_children->push_back(child) constructs the raw_ptr, it increments the refcount from 0 to 1 on already freed memory, bypassing the mitigation and allowing a stable UAF.
Suggested Fix
- Prevent dangling pointer return: Modify
AXTree::CreateNodeso that iftry_emplacefails (i.e.,inserted == false), it does not returnnode_raw. Instead, it should returnnullptror crash, as the tree state is invalid. - Reset state on failure: In
AutomationAXTreeWrapper::OnAccessibilityEvents, ifax_tree_->Unserialize(update)returnsfalse, theax_tree_instance should be completely reset or destroyed. The tree is in an untrusted, partially updated state and should not be reused for subsequent updates. - Strengthen ID validation: Ensure that
AXTree::Unserializestrictly rejects updates containingkInvalidAXNodeIDacross all build configurations, not just whenAX_FAIL_FAST_BUILD()is enabled.
Evaluated with Chrome root at commit: 661452647ddb2827305122ff3273bd5dea403f09
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.
Raised in root component due to access or custom field issues on 1279373
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 code fails to reset the accessibility tree after a failed unserialize and returns a dangling pointer when inserting a duplicate node ID.
Impact
A compromised content renderer could achieve a persistent use-after-free in the extension renderer, potentially leading to further exploitation, though no working proof-of-concept has been executed.
What the attacker needed
An active extension using chrome.automation; a compromised content renderer
The fix
The code should be fixed by preventing CreateNode from returning a dangling pointer on insertion failure, resetting the tree after a failed unserialize, and strictly rejecting invalid node IDs in all builds.
How it was found
- A compromised content renderer sends an accessibility tree update that includes a child with the invalid ID 0.
- The update fails validation, but the tree's internal map now contains the invalid ID.
- The attacker sends a second update for the same tree ID, again referencing child ID 0.
- Node creation fails because the ID already exists, and a dangling pointer is stored in the tree.
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 is a bug where a program keeps using memory after it has been freed, which can let an attacker control what happens next. Here, a malicious part of the browser can trick the accessibility code into storing a pointer to freed memory, and a protection called MiraclePtr that normally catches this is bypassed.
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.