Use after free in Extensions (CVE-2026-11652)
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 26 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 https://chromium.googlesource.com/chromium/src/+/main/docs/security/ai-generated-security-bugs-faq.md for more information.
Overview: A compromised extension renderer can trigger a premature extension suspension by manipulating the lazy keepalive count. If the extension has multiple frames in a tab with an active JavaScript dialog, synchronous destruction during the closing sequence leads to a Use-After-Free (UAF) in the browser process.
Affected files:
extensions/browser/process_manager.ccextensions/browser/extension_frame_host.ccextensions/common/mojom/frame.mojom
Estimated timestamp from git blame: 2023-10-16
Summary
A potential Use-After-Free (UAF) vulnerability exists in the browser process within extensions::ProcessManager::CloseLazyBackgroundPageNow. The issue arises because a compromised extension renderer can force the extension's keepalive count to zero, triggering a suspension sequence while extension frames are still active. If multiple frames from the same WebContents are present and a JavaScript dialog is active, the synchronous destruction of the WebContents causes the browser to dereference dangling content::RenderFrameHost pointers.
Root Cause Analysis
1. Keepalive Count Underflow
In extensions/browser/process_manager.cc, the DecrementLazyKeepaliveCount method (called via the mojom::LocalFrameHost Mojo IPC) decrements the lazy_keepalive_count without sufficient validation in release builds:
void ProcessManager::DecrementLazyKeepaliveCount(...) {
BackgroundPageData& data = background_page_data_[extension_id];
DCHECK(data.lazy_keepalive_count > 0 || ...);
--data.lazy_keepalive_count;
// ...
if (data.lazy_keepalive_count == 0) {
// Initiates suspension...
}
}
A compromised renderer can send this IPC multiple times to force the counter to zero, even if it was never incremented by that renderer, or if other extension frames still rely on it.
2. Vulnerable Closing Loop
When the suspension sequence completes, ProcessManager::CloseLazyBackgroundPageNow is called. It identifies all extension-related frames and stores their raw pointers in a vector for closure:
std::vector<content::RenderFrameHost*> frames_to_close;
// ... collection of frames ...
for (content::RenderFrameHost* frame : frames_to_close) {
content::WebContents::FromRenderFrameHost(frame)->ClosePage();
UnregisterRenderFrameHost(frame);
}
3. Synchronous Destruction and UAF
content::WebContents::ClosePage() typically operates asynchronously. However, if a JavaScript dialog (like alert()) is currently visible, RenderFrameHostImpl::IsPageReadyToBeClosed() returns true, causing the destruction to proceed synchronously.
If the frames_to_close vector contains multiple frames from the same WebContents (e.g., two extension iframes in one tab), the first iteration's call to ClosePage() will synchronously destroy the WebContents and all its associated RenderFrameHost objects. The subsequent iteration then attempts to dereference a dangling RenderFrameHost* via WebContents::FromRenderFrameHost(frame), resulting in a UAF in the browser process.
Potential Attack Steps
- From a compromised extension renderer, call the
DecrementLazyKeepaliveCountIPC repeatedly to force the extension's keepalive count to zero. - Ensure the extension has multiple active iframes within a single tab (e.g., by embedding them in a parent page).
- Trigger a JavaScript dialog (e.g.,
window.alert()) in that tab. - Wait for the extension suspension timeout to trigger
CloseLazyBackgroundPageNow. - The browser process should crash or exhibit memory corruption when attempting to close the second iframe in the loop.
Suggested Fix
- Implement robust underflow protection in
ProcessManager::DecrementLazyKeepaliveCountfor release builds (e.g., usingCHECKor saturated arithmetic). - Use
content::GlobalRenderFrameHostIdorbase::WeakPtr<content::RenderFrameHost>instead of raw pointers in theframes_to_closevector to safely track frame lifetimes across synchronous calls. - Verify that the
RenderFrameHoststill exists before dereferencing it in the closing loop.
Evaluated with Chrome root at commit: b3153093eb3c78c3e88ccf562bcbc20437a04b0e
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.
What is known
A high-severity memory corruption bug in Extensions (Google Chrome). Chrome VRP made it public on 8 June 2026 as CVE-2026-11652. Fixed in version 149.0.7827.102.
About 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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
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.