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

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

A use-after-free vulnerability exists in the browser process due to a double-release of the FileSelectHelper manual reference count when an asynchronous Enterprise Content Analysis scan is interrupted by tab closure on macOS. An attacker could potentially exploit this to achieve remote code execution and sandbox escape.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 57 days

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 the browser process due to a double-release of the FileSelectHelper manual reference count. This occurs when an asynchronous Enterprise Content Analysis scan is interrupted by tab closure on macOS. The logic flaw prematurely deletes the object before its bounded scoped_refptr is destroyed.

Affected files:

  • chrome/browser/file_select_helper.cc
  • chrome/browser/file_select_helper_mac.mm

Estimated timestamp from git blame: 2025-06-10

Description

A potential Use-After-Free (UAF) vulnerability exists in FileSelectHelper due to flawed lifetime management. The class uses a combination of scoped_refptr and manual AddRef()/Release() calls to manage its lifecycle during asynchronous file operations.

On macOS, if a user selects a file package (like a .app bundle), FileSelectHelper zips it and stores the path in temporary_files_. If Enterprise Content Analysis is enabled, a deep scan is triggered asynchronously, holding a scoped_refptr to the FileSelectHelper in its completion callback.

If the WebContents is destroyed (e.g., the tab is closed) while the scan is pending, WebContentsDestroyed() calls CleanUp().

  1. CleanUp() schedules the deletion of temporary files via base::BindOnce(&DeleteFiles, std::move(temporary_files_)).
  2. The std::move() operation clears the temporary_files_ vector.
  3. CleanUp() then explicitly calls Release() to drop the manual reference.

When the async scan completes or is aborted, the ContentAnalysisCompletionCallback runs. It calls AbortIfWebContentsDestroyed(), which detects the null WebContents and delegates to RunFileChooserEnd().

RunFileChooserEnd() is designed to early-return and not call Release() if there are temporary files, expecting CleanUp() to handle it:

C++
if (!temporary_files_.empty())
  return;

However, because CleanUp() previously emptied the vector using std::move, this check evaluates to true. RunFileChooserEnd() proceeds to call Release() a second time.

This double-release drops the reference count to zero, destroying the FileSelectHelper object. Once the callback completes, the scoped_refptr holding the callback's reference is destroyed, calling Release() on the freed memory and causing a UAF in the browser process.

Potential Trigger Steps

Please note: These are potential steps based on code analysis. Our tooling does not yet have the ability to run code or provide a working Proof of Concept.

  1. The victim uses Chrome on macOS in an environment with Enterprise Content Analysis enabled for file uploads.
  2. The attacker hosts a malicious web page that prompts the victim to upload a file via an <input type="file"> element.
  3. The victim selects a macOS package file (e.g., a .app bundle).
  4. The browser begins processing the file, populating temporary_files_ and starting the background content analysis scan.
  5. The malicious page executes window.close() to immediately close the tab.
  6. The scan aborts or completes, firing the callback and triggering the UAF.

Impact

This is a potential Use-After-Free in the highly privileged Browser process. Because the UAF occurs on a scoped_refptr decrementation (which modifies a reference count in the freed object itself), it is not protected by MiraclePtr/BackupRefPtr and could potentially be leveraged for Remote Code Execution (RCE) and a Sandbox Escape.

Suggested Fix

Do not rely on temporary_files_.empty() as a proxy to determine if Release() has already been called.

A robust fix would be to migrate FileSelectHelper away from manual AddRef()/Release() calls entirely, instead relying on standard scoped_refptr semantics or base::WeakPtr where appropriate.

If manual reference counting must be maintained, introduce a boolean flag (e.g., is_manual_ref_released_) to explicitly track whether the manual reference has already been dropped, ensuring Release() is only called once.

Evaluated with Chrome root at commit: 20b4086e0ae78b92a13bd37efb403f68976e023e


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

The code uses temporary_files_.empty() to decide whether to release a manual reference, but CleanUp() empties that vector with std::move before the check, causing a second Release() and premature destruction.

Impact

This could potentially be leveraged for Remote Code Execution (RCE) and a Sandbox Escape, as the UAF is not protected by MiraclePtr/BackupRefPtr.

What the attacker needed

Chrome on macOS; Enterprise Content Analysis enabled; Victim selects a package file; Victim visits attacker page

The fix

The fix should migrate FileSelectHelper away from manual AddRef()/Release() calls, or if manual reference counting must be maintained, introduce a boolean flag to explicitly track whether the manual reference has already been dropped.

How it was found

  1. The victim uses Chrome on macOS with Enterprise Content Analysis enabled for file uploads.
  2. The attacker hosts a malicious web page that prompts the victim to upload a file via an input element.
  3. The victim selects a macOS package file (e.g., a .app bundle).
  4. The browser begins processing the file, populating temporary_files_ and starting the background content analysis scan.
  5. The malicious page executes window.close() to immediately close the tab.
  6. The scan aborts or completes, firing the callback and triggering the UAF.

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 is a bug where a program frees memory but then keeps using it, like deleting a file and then trying to open it. Here, a file selection helper object is deleted twice, so later code touches freed memory. This could let an attacker run their own code on the computer.

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.