Use after free in Chrome for iOS (CVE-2026-13915)
A use-after-free flaw exists in Chrome for iOS when a tab group is closed during an asynchronous favicon fetch. An attacker could potentially reclaim the freed memory with controlled data and cause the browser to access it, though no working exploit was demonstrated.
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 Chrome Security team. Please see https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A Use-After-Free (UAF) vulnerability exists in the iOS collaboration flow when a TabGroup is closed during an asynchronous favicon fetch. A dangling pointer is assigned to an Objective-C configuration object without raw_ptr protection, bypassing MiraclePtr and leading to a potential UAF when accessed by the ShareKit service.
Affected files:
ios/chrome/browser/collaboration/model/ios_collaboration_controller_delegate.mmios/chrome/browser/share_kit/model/share_kit_share_group_configuration.hios/chrome/browser/share_kit/model/share_kit_manage_configuration.h
Estimated timestamp from git blame: 2025-02-28
Technical Details
A potential Use-After-Free (UAF) vulnerability has been identified in the iOS collaboration and sharing flow. The issue occurs when the TabGroup backing a share operation is destroyed while an asynchronous visual data fetch is pending, leading to a MiraclePtr bypass.
When a user initiates sharing for a tab group, IOSCollaborationControllerDelegate::ShowShareDialog is called. This method retrieves the local TabGroup* and initiates an asynchronous fetch of the group's favicons via favicons_grid_configurator_->FetchFaviconsGrid. A callback is created using base::BindOnce to handle the completion of this fetch:
auto callback = base::BindOnce(
&IOSCollaborationControllerDelegate::ConfigureAndShareTabGroup,
weak_ptr_factory_.GetWeakPtr(), either_id, std::move(result), tab_group);
The FetchFaviconsGrid operation can take up to 5 seconds (enforced by a dispatch_after timeout), during which the UI is not blocked. If the tab group is deleted during this window (e.g., via the user closing it in the UI, or a remote sync deletion event), the C++ TabGroup object is destroyed immediately.
While the TabGroup is destroyed, the memory is temporarily protected (quarantined) by MiraclePtr because the base::BindOnce state holds an internal raw_ptr to it. However, the cancellation flow triggered by the group's deletion is flawed. IOSCollaborationControllerDelegate::Cancel attempts to cancel the downstream UI by passing session_id_ to ShareKitService. Because the flow is still pending the favicon fetch, session_id_ is nil, meaning the operation is not properly aborted.
When the favicon fetch completes (or the 5-second timeout fires), the callback executes ConfigureAndShareTabGroup. It takes the quarantined tab_group pointer and assigns it to a ShareKitShareGroupConfiguration object:
@property(nonatomic, assign) const TabGroup* tabGroup;
Because this property uses the Objective-C assign semantic, the pointer is stored as a raw, unprotected memory address. The configuration object is then passed to the downstream ShareKitService.
Once the ConfigureAndShareTabGroup method finishes, the base::BindOnce callback state is destroyed. The internal raw_ptr goes out of scope, the MiraclePtr reference count drops to zero, and the TabGroup memory is completely unquarantined and freed to the system allocator.
The ShareKitService now holds a raw pointer to fully freed memory. If it accesses config.tabGroup asynchronously to extract metadata for the UI, a Use-After-Free occurs in the highly-privileged browser process.
Potential Exploitation Steps (Theoretical)
Note: These are suggested steps based on static analysis; a working Proof of Concept has not been executed.
- An attacker initiates the tab group sharing flow, triggering the 5-second asynchronous favicon fetch.
- Immediately, the attacker triggers the deletion of the tab group (e.g., via an incoming remote sync update, or programmatically closing the group).
- The
TabGroupC++ object is destroyed, but its memory is temporarily held in quarantine by the pending callback'sBindState. - The callback executes, assigning the raw pointer to the Objective-C
ShareKitShareGroupConfigurationobject. - The callback finishes, destroying the
BindStateand releasing the memory from quarantine. - The attacker heavily allocates memory in the browser process to reclaim the exact memory chunk previously used by the
TabGroupwith attacker-controlled data. - The downstream
ShareKitServiceasynchronously accesses thetabGrouppointer, dereferencing the attacker-controlled memory and triggering the UAF.
Suggested Remediation
- Update
ShareKitShareGroupConfigurationandShareKitManageConfigurationto store the tab group as abase::WeakPtr<const TabGroup>instead of a rawassignpointer. Provide a C++ setter/getter if necessary to bridge between Objective-C and the C++ WeakPtr. - In
IOSCollaborationControllerDelegate::ConfigureAndShareTabGroup(andConfigureAndManageTabGroup), pass theTabGroupas abase::WeakPtrand verify its validity (if (!tab_group) return;) before attempting to construct the configuration object and initiate the downstream ShareKit session.
Evaluated with Chrome root at commit: cc901875d53bf4e4fe0e01f02843871da4106e70
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 cancellation path fails to abort the pending favicon fetch because the session identifier is nil, and the completion callback then stores the tab group pointer in an Objective-C property with assign semantics, which bypasses the memory protection that would otherwise keep the object alive.
Impact
If the freed memory is reclaimed with attacker-controlled data, the browser process could access it, potentially leading to memory corruption; however, the report notes that no working proof of concept has been executed.
What the attacker needed
User initiates tab group sharing; tab group deleted during favicon fetch; attacker can influence memory allocation
The fix
The configuration objects should store the tab group as a weak pointer and the callback should check that the pointer is still valid before using it.
How it was found
- Start sharing a tab group, which begins the asynchronous favicon fetch.
- Delete the tab group before the fetch completes, for example through a remote sync update.
- The tab group object is destroyed but its memory is quarantined by the pending callback.
- The callback runs and stores the raw pointer in the share configuration object.
- The callback finishes, releasing the memory from quarantine.
- Allocate memory in the browser process to reclaim the freed chunk with controlled data.
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 some memory but keeps a pointer to it and later uses that pointer again. Here, a tab group object is deleted while the browser is still waiting for its icons to load, and a later step still tries to use the deleted object. If an attacker can put their own data in that freed memory, the browser might treat it as valid and misbehave.
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.