Use after free in Views (CVE-2026-79047)
A use-after-free was reported in Chromium's menu controller: after a drag-hover update calls SetSelection(), accessibility events can synchronously dismiss the menu and free the controller, yet the code keeps using it. An attacker could potentially cause memory corruption in the browser process, though the report is based on static analysis only and no working proof of concept exists.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
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. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A potential Use-After-Free (UAF) vulnerability exists in MenuController::OnDragUpdated due to a missing WeakPtr validation guard after invoking SetSelection(). Focus or selection changes inside SetSelection() can trigger synchronous menu dismissal and deletion of the MenuController via re-entrant accessibility events. Subsequent executions in OnDragUpdated operate on the freed memory, potentially leading to memory corruption in the browser process.
Affected files:
ui/views/controls/menu/menu_controller.cc
Estimated timestamp from git blame: 2026-02-10
Summary
A potential Use-After-Free (UAF) memory corruption vulnerability exists in the browser process within MenuController::OnDragUpdated in ui/views/controls/menu/menu_controller.cc. When processing drag-and-drop hover updates, OnDragUpdated calls SetSelection(). If active accessibility software (such as a screen reader or automation client) is running, selection/focus updates can synchronously fire native OS accessibility events. Processing these events can trigger synchronous dismissal of the menu and deletion of the MenuController instance. Because OnDragUpdated does not check if this has been destroyed after SetSelection() returns, it executes subsequent operations on the deallocated controller object.
Root Cause Analysis
In ui/views/controls/menu/menu_controller.cc, MenuController::OnDragUpdated performs the following sequence:
int MenuController::OnDragUpdated(SubmenuView* source,
const ui::DropTargetEvent& event) {
...
if (menu_item) {
...
// If the menu has a submenu, schedule the submenu to open.
SetSelection(menu_item, menu_item->HasSubmenu() ? SELECTION_OPEN_SUBMENU
: SELECTION_DEFAULT);
// Missing lifetime check for `this` here!
if (drop_position == MenuDelegate::DropPosition::kNone ||
drop_operation == ui::DragDropTypes::DRAG_NONE) {
menu_item = nullptr;
}
} else {
SetSelection(source->GetMenuItem(), SELECTION_OPEN_SUBMENU);
// Missing lifetime check for `this` here!
}
SetDropMenuItem(menu_item, drop_position); // UAF read and write on this->
last_drop_operation_ = drop_operation; // UAF write to this->last_drop_operation_
return drop_operation;
}
Inside SetSelection(), multiple guards using auto this_ref = AsWeakPtr() and checking if (!this_ref) return; exist to handle re-entrant destruction safely. These guards are necessary because operations like setting the popup focus override or firing accessibility selection events can cause active assistive technology (AT) observers to synchronously dismiss the menu, deleting the MenuController (via MenuRunnerImpl::OnMenuClosed -> delete controller_.get()).
When a guard inside SetSelection is triggered, it returns early. However, OnDragUpdated unconditionally continues execution after SetSelection() returns, leading to:
- A UAF read and write inside
SetDropMenuItem()when accessingdrop_target_tracker_(a by-valueViewTrackermember) and assigningdrop_position_. - A UAF write to
last_drop_operation_on the freedMenuControllerheap space.
Potential Steps to Reproduce
Note: These are potential steps based on static analysis of the codebase; our tooling does not currently have the capability to run code to confirm a working Proof of Concept.
- Enable system accessibility tools (e.g., a screen reader or magnifier) to activate Chromium's accessibility engine.
- Open a menu that accepts drag-and-drop operations (such as the Bookmark Bar overflow menu or folder submenus).
- Drag a draggable web element or link from an attacker-controlled webpage and hover over the menu items.
- As the drag hover transitions between menu items,
MenuController::OnDragUpdatedis invoked, which callsSetSelection()and triggers synchronous accessibility events. - If the assistive technology client's reaction causes a synchronous window focus loss or deactivation, the menu is dismissed and the
MenuControlleris deleted. - On return from
SetSelection(),OnDragUpdatedcontinues executing, resulting in heap read/write operations on the freedMenuControllerallocation.
Suggested Fix
To mitigate this issue, check the controller's lifetime using its weak pointer factory after returning from any call to SetSelection() within OnDragUpdated():
auto this_ref = AsWeakPtr();
if (menu_item) {
...
SetSelection(menu_item, menu_item->HasSubmenu() ? SELECTION_OPEN_SUBMENU
: SELECTION_DEFAULT);
if (!this_ref) {
return ui::DragDropTypes::DRAG_NONE;
}
if (drop_position == MenuDelegate::DropPosition::kNone ||
drop_operation == ui::DragDropTypes::DRAG_NONE) {
menu_item = nullptr;
}
} else {
SetSelection(source->GetMenuItem(), SELECTION_OPEN_SUBMENU);
if (!this_ref) {
return ui::DragDropTypes::DRAG_NONE;
}
}
Evaluated with Chrome root at commit: 5133b93d189b383c37805b1cf3a9d2dbfe8d7379
Results so far have been promising, but there can be wrong deductions. Feel free to adjust as follows:
- If you are familiar with the severity guidelines, you may adjust the severity.
- If this is a false positive, and there's no work to be done, please close as WAI.
- If there is work to do here but not a vulnerability, please change the issue type to Task/Bug/FR.
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, OnDragUpdated does not re-check that the MenuController still exists after SetSelection() returns, even though SetSelection() can synchronously dismiss the menu and delete the controller.
Impact
Could lead to memory corruption in the browser process, but only when accessibility software is active and it reacts to the events by dismissing the menu; no exploit was demonstrated.
What the attacker needed
Accessibility software active; user drags content over an open menu; attacker-controlled page supplies the drag
The fix
The code should check the controller's weak pointer after each SetSelection() call in OnDragUpdated and return early if the controller has been destroyed.
How it was found
- Turn on system accessibility tools so Chromium's accessibility engine is active.
- Open a menu that accepts drag-and-drop, such as a bookmark bar overflow menu or folder submenu.
- Drag a draggable element or link from an attacker-controlled page and hover over the menu items.
- As the hover moves between items, OnDragUpdated runs and calls SetSelection(), firing synchronous accessibility events.
- If the assistive technology causes a synchronous focus loss, the menu is dismissed and the controller is deleted.
- On return, OnDragUpdated keeps running and reads and writes the freed controller memory.
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 when a program frees a chunk of memory and then keeps using it, so the data there can be replaced with something else. Here, updating a menu during a drag can trigger a screen reader event that closes and deletes the menu, but the code carries on touching the deleted menu. The report is theoretical: it comes from reading the code, not from running an exploit.
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.