Use after free in TabStrip (CVE-2026-11262)
The tab strip model's close methods lack re-entrancy guards, so a synchronous observer can destroy a tab while a move operation is still in progress. The move code then dereferences the freed tab pointer, which the report says could lead to remote code execution in the browser process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 2 months
Flapjack, 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 Use-After-Free vulnerability exists in TabStripModel because CloseWebContentsAt and CloseTabs lack re-entrancy guards. This allows a synchronous observer to destroy a tab while it is being moved, bypassing MiraclePtr protection and leading to a use-after-free when the move operation resumes.
Affected files:
chrome/browser/ui/tabs/tab_strip_model.ccchrome/browser/ui/tabs/tab_strip_model.h
Estimated timestamp from git blame: 2025-12-30
Summary
A potential Use-After-Free (UAF) vulnerability has been identified in TabStripModel within the browser process. The issue arises from the omission of ReentrancyCheck guards in the TabStripModel::CloseWebContentsAt and TabStripModel::CloseTabs methods. This omission permits synchronous observers to initiate tab closures while another model operation, such as moving a tab, is already underway.
Specifically, during a tab move operation, TabStripModel::MoveTabToIndexImpl caches a raw pointer to the tab, synchronously notifies observers, and then later dereferences the raw pointer. If an observer closes the tab during the notification, the tab is destroyed, leading to a UAF upon return. Furthermore, the local raw_ptr that temporarily protects the tab during the notification is destroyed before the vulnerable dereference, bypassing MiraclePtr (BRP) protections.
Technical Details
- Missing Guard: Most state-modifying methods in
TabStripModel(e.g.,MoveWebContentsAt,InsertWebContentsAt) instantiate aReentrancyCheck reentrancy_check(&reentrancy_guard_)to prevent nested modifications. However,CloseWebContentsAtandCloseTabsdo not. - Vulnerable Flow: When a tab is moved,
MoveWebContentsAtcorrectly sets the re-entrancy guard and callsMoveTabToIndexImpl. - Raw Pointer Usage:
MoveTabToIndexImplstores a raw pointer:tabs::TabInterface* const tab = GetTabAtIndex(initial_index);. - Observer Notification: It then calls
SendMoveNotificationForTab(initial_index, final_index, tab, selection);. - Temporary BRP Protection: Inside
SendMoveNotificationForTab, the tab is placed into aTabStripModelChange::Movestruct, which stores it as araw_ptr<tabs::TabInterface>. This temporarily increments the BackupRefPtr (BRP) reference count. - Re-entrant Close: Observers are notified synchronously. If an attacker-controlled or influenced observer (e.g., via an extension) calls
CloseWebContentsAtfor the moving tab, the call proceeds becauseCloseWebContentsAtlacks aReentrancyCheck. The tab is subsequently detached and deleted. - Protection Scope Ends: When the notification completes,
SendMoveNotificationForTabreturns, and its localTabStripModelChangeobject is destroyed. This decrements the BRP reference count to zero, freeing the memory for reallocation. - The UAF: Execution resumes in
MoveTabToIndexImpl, which immediately callsif (initial_pinned_state != tab->IsPinned()). The virtual callIsPinned()dereferences the now-freed and unquarantined rawtabpointer. If an attacker has sprayed the heap in the interim, this results in Remote Code Execution (RCE) in the browser process.
Note: These are potential steps, as our tooling does not currently run the code to produce a working proof-of-concept.
Suggested Fix
- Add Re-entrancy Guards: Instantiate
ReentrancyCheck reentrancy_check(&reentrancy_guard_);inTabStripModel::CloseWebContentsAtandTabStripModel::CloseTabsto prevent nested tab closures. - Defense in Depth: In
MoveTabToIndexImpl(and similar methods likeInsertTabAtIndexImpl), usebase::raw_ptr<tabs::TabInterface> tab = GetTabAtIndex(...)instead of a raw pointer. This ensures that BRP quarantines the memory for the entire duration of the function's execution, turning any potential UAFs from complex re-entrancy bugs into safe crashes.
Evaluated with Chrome root at commit: 09ec9e7cc4d24823d20b6d37cf3d282734f6bf0f
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 close methods omit the re-entrancy guard used by other state-changing methods, and the move code holds a plain pointer whose temporary protection ends before the final dereference.
Impact
If an attacker can spray the heap in the gap, this could result in remote code execution in the browser process, though the report notes no working proof-of-concept was produced.
What the attacker needed
An observer that closes the tab; attacker-influenced observer, e.g. extension; heap spray to control freed memory
The fix
It should be fixed by adding re-entrancy guards to the close methods and by holding a protected pointer for the whole move function so the memory stays quarantined.
How it was found
- Move a tab so the move implementation caches a pointer to it and notifies observers.
- Have an observer close that same tab during the synchronous notification.
- The tab is detached and deleted while the move operation is paused.
- The notification returns and its temporary protection is released.
- The move code resumes and calls a method on the freed tab pointer.
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 an object but keeps using it, like deleting a file and then opening it again. Here, moving a tab briefly tells other parts of the browser about the move, and one of those parts can close the tab in the middle of that. When the move code carries on, it touches memory that has already been released.
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.