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

Use after free in File Input (CVE-2026-11630)

A use-after-free vulnerability exists in the browser process's file picker handling, where a raw pointer to a frame is kept across a call that can run a nested message loop. An attacker could potentially trigger memory corruption by removing the frame during that loop, leading to a dangling pointer dereference.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 14 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. 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 the browser process within ShowFilePickerOnUIThread. The function resolves and retains a raw RenderFrameHost* pointer across a call to ForSecurityDropFullscreen, which can synchronously spin a nested message loop (e.g., during Cocoa fullscreen transition animations on macOS). If the requesting subframe is detached and destroyed during this nested loop, subsequent dereferences of the dangling raw pointer can lead to browser-process memory corruption.

Affected files:

  • content/browser/file_system_access/file_system_access_manager_impl.cc
  • content/browser/file_system_access/file_system_chooser.cc
  • content/browser/web_contents_based_canceller.cc

Estimated timestamp from git blame: 2025-11-07

Summary and Root Cause

A potential Use-After-Free (UAF) vulnerability has been identified in content/browser/file_system_access/file_system_access_manager_impl.cc within the ShowFilePickerOnUIThread function.

The function obtains a raw, stack-allocated RenderFrameHost* pointer (rfh) from a GlobalRenderFrameHostId at the beginning of the call:

C++
RenderFrameHost* rfh = RenderFrameHost::FromID(frame_id);

It then retains this raw pointer across a call to ForSecurityDropFullscreen:

C++
auto blocker = web_contents->ForSecurityDropFullscreen(display::kInvalidDisplayId);

ForSecurityDropFullscreen initiates a fullscreen exit for the target window or tab. On macOS, this calls AppKit's native -[NSWindow toggleFullScreen:] inside the Cocoa window bridge, which synchronously spins a nested message loop while running the transition animation. Because the browser process continues processing incoming IPC messages during this nested loop, if the renderer sends a detachment IPC for a subframe (e.g., if the parent frame removes the iframe), the subframe's RenderFrameHost is immediately destroyed and freed.

Once the fullscreen transition completes and the nested message loop exits, ShowFilePickerOnUIThread resumes execution. However, the raw stack pointer rfh is now dangling. It is subsequently passed to FileSystemChooser::CreateAndShow:

C++
FileSystemChooser::CreateAndShow(rfh, options, std::move(callback), std::move(scoped_objects));

Dereference Mechanism

Inside FileSystemChooser::CreateAndShow, multiple dereferences of the dangling pointer occur:

  1. Resolving the associated WebContents via WebContents::FromRenderFrameHost(render_frame_host), which calls rfh->delegate().
  2. In WebContentsBasedCanceller::WebContentsBasedCanceller, the code performs virtual function dispatch on the freed memory to get a weak document pointer:
C++
document_(render_frame_host->GetWeakDocumentPtr())

Since rfh is a raw stack-allocated pointer and not a class member variable, it is not protected by MiraclePtr/BackupRefPtr (BRP). Because the browser process runs unsandboxed with full privileges, performing a virtual method call on freed memory could potentially be leveraged to hijack control flow.

Potential Trigger Scenario

An attacker might attempt to trigger this issue using same-origin iframe interactions and transition races:

  1. An attacker page (Parent) contains a same-origin subframe (Iframe).
  2. The user interacts with the page, entering HTML fullscreen.
  3. The user interacts with the iframe, invoking the file picker API (window.showOpenFilePicker()).
  4. The browser UI thread enters ShowFilePickerOnUIThread, resolves rfh to the iframe's RenderFrameHost, and calls ForSecurityDropFullscreen which spins a nested message loop.
  5. During the nested loop, the parent page removes the iframe from the DOM (iframe.remove()). The frame detachment IPC is processed immediately, destroying the iframe's RenderFrameHost.
  6. ShowFilePickerOnUIThread resumes and invokes FileSystemChooser::CreateAndShow with the freed rfh pointer.

Note: These are suggested potential steps; our current security analysis tooling does not have the capability to run code or verify the exploitability of this flow dynamically.

Recommended Remediation

To remediate this issue, the code must re-resolve the RenderFrameHost from its GlobalRenderFrameHostId immediately after exiting any operation that could spin a nested message loop, such as ForSecurityDropFullscreen. If the re-resolved pointer is null, the operation must abort safely.

C++
auto blocker = web_contents->ForSecurityDropFullscreen(display::kInvalidDisplayId);
if (!blocker) {
  std::move(callback).Run(file_system_access_error::FromStatus(
                              FileSystemAccessStatus::kOperationAborted),
                          {});
  return;
}

// Re-resolve RFH to ensure it wasn't detached during the nested loop
rfh = RenderFrameHost::FromID(frame_id);
if (!rfh) {
  std::move(callback).Run(file_system_access_error::FromStatus(
                              FileSystemAccessStatus::kOperationAborted),
                          {});
  return;
}

Evaluated with Chrome root at commit: a2bea94528f4bd6cc57739c43fa3bb890b8367d3


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.

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

The code retains a raw RenderFrameHost pointer across a call that can synchronously spin a nested message loop, allowing the frame to be destroyed and the pointer to dangle.

Impact

The browser process runs unsandboxed, so a virtual method call on freed memory could potentially be leveraged to hijack control flow, though the report notes the exploitability has not been dynamically verified.

What the attacker needed

Victim uses macOS; attacker page with same-origin iframe; user enters fullscreen; user invokes file picker

The fix

The code should re-resolve the RenderFrameHost from its GlobalRenderFrameHostId immediately after any operation that could spin a nested message loop, and abort safely if the pointer is null.

How it was found

  1. An attacker page contains a same-origin iframe.
  2. The user enters HTML fullscreen on the page.
  3. The user interacts with the iframe to invoke the file picker API.
  4. The browser enters ShowFilePickerOnUIThread and calls ForSecurityDropFullscreen, which spins a nested message loop.
  5. During the loop, the parent page removes the iframe from the DOM, destroying its RenderFrameHost.
  6. ShowFilePickerOnUIThread resumes and passes the freed pointer to FileSystemChooser::CreateAndShow.

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 using a piece of memory after it has been freed. Here, the browser holds onto a reference to a web page frame while it briefly pauses to exit fullscreen; if the page removes that frame during the pause, the reference becomes invalid and using it can crash or corrupt the browser.

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.