Uninitialized Use in Accessibility (CVE-2026-6311)
The methods get_columnHeaderCells and get_rowHeaderCells allocate an array with CoTaskMemAlloc but may leave elements uninitialized if node lookups fail, and they return the requested size instead of the populated count. A compromised renderer could exploit this to escape the sandbox by grooming the OLE heap and hijacking control flow via the COM marshaller.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 16 days
Project Fortify, an experimental security project, has identified the following potential security issue.
Overview: The AXPlatformNodeWin::get_columnHeaderCells and get_rowHeaderCells methods allocate an array via CoTaskMemAlloc but may leave elements uninitialized if node lookups fail. The methods incorrectly return the requested array size rather than the successfully populated count, causing the COM marshaller to process uninitialized memory. A compromised renderer could potentially exploit this to escape the sandbox by grooming the OLE heap.
Affected files:
ui/accessibility/platform/ax_platform_node_win.cc
Estimated timestamp from git blame: 2022-02-08
Summary
A potential uninitialized memory vulnerability exists in ui/accessibility/platform/ax_platform_node_win.cc within the AXPlatformNodeWin::get_columnHeaderCells and AXPlatformNodeWin::get_rowHeaderCells methods. If an accessibility node lookup fails during array population, the uninitialized memory allocated by ::CoTaskMemAlloc is returned to the COM caller because the methods return the requested array size instead of the number of successfully populated elements.
Technical Details
Both vulnerable methods follow the exact same pattern. For instance, in get_columnHeaderCells:
- The method retrieves a list of node IDs (
column_header_ids). - It allocates memory using
::CoTaskMemAlloc(column_header_ids.size() * sizeof(IUnknown*)). Crucially,CoTaskMemAllocdoes not zero-initialize the memory. - It iterates over the IDs, looks up the corresponding wrapper, and if successful, calls
QueryInterfaceand increments anindexcounter. - If
GetDelegate()->GetFromNodeID(node_id)returnsnullptr(e.g., due to a missing wrapper from reparenting edge cases), the loop skips the element and does not incrementindex. - The method concludes by setting
*n_column_header_cells = static_cast<LONG>(column_header_ids.size());instead of using theindexvariable.
If any node lookup fails, the resulting array will contain uninitialized bytes at the end, but the output count (*n_column_header_cells) tells the COM marshaller that the entire array is populated with valid IUnknown* pointers.
Potential Exploitation Steps
Note: These are suggested steps based on static analysis. Our tooling agent does not currently have the capability to run code to produce a working Proof of Concept.
An attacker with a compromised renderer process could potentially achieve a sandbox escape (RCE in the browser process) through the following sequence:
- Heap Grooming: The attacker sends
AXTreeUpdateIPC messages containing many nodes with large string attributes (likekNameorkDescription). These are allocated asBSTRobjects in the browser process, which use the same Windows OLE/COM heap asCoTaskMemAlloc. This allows the attacker to fill the heap with fake COM object pointers and fake vtables. - State Corruption: The attacker sends a crafted
AXTreeUpdatedesigned to trigger a reparenting edge case (e.g., exploiting crbug.com/40833630). This creates a state where anAXNodeexists logically in the tree but lacks a corresponding platform wrapper in theid_wrapper_map_. - Table Construction: The attacker constructs a table where the column headers reference the ID of the corrupted node alongside valid node IDs.
- Trigger: An external out-of-process accessibility client (like a screen reader) is induced to query
get_columnHeaderCellson the target table. - Vtable Dispatch: The browser returns the array containing uninitialized, attacker-controlled OLE heap memory. The Windows NDR (Network Data Representation) marshaller iterates over the array based on the inflated count and calls
QueryInterfaceandReleaseon the garbage pointers. This indirect call dereferences the attacker's fake vtable, hijacking control flow.
Note that MiraclePtr does not protect against this issue, as the uninitialized bytes are processed directly by the OS-level COM marshaller, bypassing PartitionAlloc.
Suggested Fix
Update both get_columnHeaderCells and get_rowHeaderCells to set the output count to the number of successfully processed nodes (index) rather than the requested size.
// ui/accessibility/platform/ax_platform_node_win.cc
// In AXPlatformNodeWin::get_columnHeaderCells (approx line 4288)
- *n_column_header_cells = static_cast<LONG>(column_header_ids.size());
+ *n_column_header_cells = static_cast<LONG>(index);
// In AXPlatformNodeWin::get_rowHeaderCells (approx line 4344)
- *n_row_header_cells = static_cast<LONG>(row_header_ids.size());
+ *n_row_header_cells = static_cast<LONG>(index);
This correctly handles cases where nodes fail to resolve, identical to the pattern already safely used in AXPlatformNodeWin::get_targets.
Evaluated with Chrome root at commit: ff3d2b74fa39431785bd60e51463b08fcc71ee33
Results from 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
The methods return the requested array size instead of the number of successfully populated elements, so uninitialized memory from CoTaskMemAlloc is treated as valid pointers.
Impact
A compromised renderer could potentially achieve a sandbox escape (RCE in the browser process), though the report notes these are suggested steps based on static analysis and no working proof of concept was produced.
What the attacker needed
Compromised renderer process; external accessibility client query; crafted AXTreeUpdate messages
The fix
The methods should be updated to set the output count to the number of successfully processed nodes (index) rather than the requested size.
How it was found
- The attacker sends AXTreeUpdate IPC messages with many nodes having large string attributes to groom the OLE heap with fake COM object pointers and vtables.
- The attacker sends a crafted AXTreeUpdate to trigger a reparenting edge case, creating an AXNode without a corresponding platform wrapper.
- The attacker constructs a table where column headers reference the corrupted node's ID alongside valid node IDs.
- An external out-of-process accessibility client is induced to query get_columnHeaderCells on the target table.
- The browser returns the array with uninitialized, attacker-controlled memory; the NDR marshaller iterates and calls QueryInterface and Release on garbage pointers, dereferencing the fake vtable and hijacking control flow.
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 a program allocates memory, it sometimes gets old data that hasn't been cleared. Here, the code asks for space for several pointers but doesn't fill them all in if some lookups fail, yet it tells the system that all are valid. An attacker who already controls one part of the browser (the renderer) could arrange for that leftover memory to contain fake pointers, and when the system tries to use them, it might run the attacker's code with higher privileges.
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.