Skip to content
Memory corruption Advisory Advanced CVE-2026-8521

Use after free in Tab Groups (CVE-2026-8521)

A raw pointer to a tab group was captured in an asynchronous dismissal block, so if the group was deleted during the animation the pointer became dangling. An attacker could potentially reallocate that memory and gain an atomic increment primitive in the browser process, possibly leading to remote code execution.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 25 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: RecentActivityCoordinator captures a raw const TabGroup* pointer in an asynchronous UIKit dismissal block. If a remote collaborator deletes the shared tab group during the dismissal animation, the memory is freed and unquarantined by BackupRefPtr. When the animation completes, the block executes with a dangling pointer, potentially leading to arbitrary memory increment and remote code execution in the browser process.

Affected files:

  • ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/recent_activity_coordinator.mm
  • ios/chrome/browser/shared/public/commands/tab_groups_commands.h
  • ios/chrome/browser/tab_switcher/tab_grid/base_grid/coordinator/base_grid_coordinator.mm
  • ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/create_tab_group_mediator.mm
  • ios/chrome/browser/tab_switcher/ui_bundled/tab_group_item.mm
  • ios/chrome/browser/shared/model/web_state_list/web_state_list.mm

Estimated timestamp from git blame: 2025-04-02

Summary

A potential use-after-free (UAF) vulnerability exists in the Chrome for iOS browser process. In RecentActivityCoordinator, a raw const TabGroup* pointer is captured by value inside an Objective-C completion block for a view controller dismissal. If the tab group is destroyed (e.g., via a remote sync event from a collaborator) before the animation completes, the pointer becomes dangling. Because the capture uses a bare C pointer rather than a raw_ptr or base::WeakPtr, BackupRefPtr (BRP) does not track the reference, allowing the memory to be unquarantined and reallocated before the block executes.

Technical Details

In ios/chrome/browser/tab_switcher/ui_bundled/tab_grid/tab_groups/recent_activity_coordinator.mm, the method -showTabGroupEditForGroup: handles user interaction with a recent activity item. It dismisses the current view controller and defers opening the tab group editor until the animation completes:

OBJECTIVEC
- (void)showTabGroupEditForGroup:(const TabGroup*)group {
  // ...
  [_viewController.presentingViewController
      dismissViewControllerAnimated:YES
                         completion:^{
                           [tabGroupsHandler showTabGroupEditionForGroup:group];
                         }];
}

Here, group is captured by value as a raw C pointer.

Suggested Exploitation Path

Note: These are potential steps based on static analysis.

  1. Attacker Action: An attacker modifies a shared tab group (e.g., changes its color), generating a sync event that appears in the victim's "Recent Activity" list.
  2. Victim Interaction: The victim opens the Recent Activity sheet and taps the attacker's edit. This calls showTabGroupEditForGroup:, initiating a ~300ms UIKit dismissal animation. The completion block capturing the raw pointer is queued.
  3. Race Condition: During this ~300ms window, the attacker deletes the shared tab group, which syncs to the victim's device.
  4. Object Destruction: The sync event triggers WebStateList::DeleteGroupIfEmpty(), executing groups_.erase(iter). This destroys the std::unique_ptr<TabGroup>, synchronously calling delete on the TabGroup instance and invalidating its WeakPtrFactory.
  5. BRP Bypass: The deletion notifies TabGroupMediator, which stops the TabGroupCoordinator. The coordinator destroys its internal raw_ptr<const TabGroup> _tabGroup. Because the Objective-C block only holds a bare C pointer, PartitionAlloc's BRP reference count reaches zero. The memory is immediately unquarantined and returned to the free list.
  6. Reallocation: The attacker uses other sync events to allocate objects of the same size, controlling the bytes at the dangling pointer's address.
  7. Dangling Pointer Dereference: The UIKit animation finishes, and the completion block executes. The dangling pointer is passed to CreateTabGroupMediator, which initializes a TabGroupItem and calls tabGroup->GetWeakPtr().

Because the attacker controls the reallocated memory, they control the WeakReference::Flag address used by GetWeakPtr(), gaining an atomic memory increment primitive (AddRef()) in the unsandboxed browser process. This is a common primitive used to achieve Remote Code Execution (RCE).

Proposed Fix

The block should capture a base::WeakPtr<const TabGroup> instead of a raw pointer. If the group is deleted during the animation, the weak pointer will safely evaluate to null.

OBJECTIVEC
- (void)showTabGroupEditForGroup:(const TabGroup*)group {
  // ...
  base::WeakPtr<const TabGroup> weakGroup = group->GetWeakPtr();
  [_viewController.presentingViewController
      dismissViewControllerAnimated:YES
                         completion:^{
                           if (weakGroup) {
                               [tabGroupsHandler showTabGroupEditionForGroup:weakGroup.get()];
                           }
                         }];
}

(Note that the TabGroupsCommands protocol may also need updating to accept a base::WeakPtr or handle null gracefully).

Evaluated with Chrome root at commit: 7353d249d9cacf9c7218e1d7b8a39cf39c72d646


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.

The original report as published on the Chromium issue tracker. Images and videos are our own copies; raw HTML is shown as text. View it on Chromium issue tracker.

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 completion block captured a bare C pointer instead of a weak pointer, so the object's lifetime was not tracked and the pointer could dangle after deletion.

Impact

An attacker could potentially gain an atomic memory increment primitive in the unsandboxed browser process, which is a common step towards remote code execution.

What the attacker needed

Victim has a shared tab group; attacker can modify and delete the group; victim taps the edit in Recent Activity; timing within the dismissal animation

The fix

The block should capture a base::WeakPtr instead of a raw pointer so that it safely evaluates to null if the group is deleted.

How it was found

  1. An attacker modifies a shared tab group, creating a sync event in the victim's Recent Activity list.
  2. The victim opens the Recent Activity sheet and taps the attacker's edit, starting a dismissal animation and queuing the completion block.
  3. During the animation window, the attacker deletes the shared tab group, which syncs to the victim's device.
  4. The sync event destroys the TabGroup object and invalidates its weak pointer factory.
  5. The attacker uses other sync events to allocate objects of the same size, controlling the freed memory.
  6. The animation finishes and the completion block dereferences the dangling pointer, potentially giving an atomic memory increment primitive.

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 keeps a reference to memory after it has been freed. Here, a pointer to a tab group was saved for later use, but the tab group could be deleted before that later use, leaving the pointer pointing at freed memory. If an attacker can control what gets placed in that freed memory, they might be able to influence the program.

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.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Memory corruption

The lesson behind this report.

Native code reads or writes memory it should not: overflows, use-after-free, type confusion. The core of browser, kernel and parser bugs.