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

Use after free in Downloads (CVE-2026-12452)

A use-after-free in the browser process occurs when a DownloadItemImpl is synchronously removed during an observer notification loop, because a nested call to UpdateObservers resets a safety flag, allowing the object to be destroyed while the outer loop still runs. An attacker could potentially trigger this on Android by manipulating the browser state during a dangerous download, leading to memory corruption.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 27 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 Use-After-Free (UAF) vulnerability in the browser process occurs when a DownloadItemImpl is synchronously removed during an observer notification loop. A logic error in the handling of a safety flag allows the object's destruction to bypass a critical check, leading to memory corruption when the notification loop continues execution on freed memory.

Affected files:

  • components/download/internal/common/download_item_impl.cc
  • content/browser/download/download_manager_impl.cc
  • chrome/browser/download/android/download_controller.cc
  • chrome/browser/download/android/dangerous_download_dialog_bridge.cc

Estimated timestamp from git blame: 2017-08-17

Description

A potential Use-After-Free (UAF) vulnerability exists in DownloadItemImpl due to improper management of the is_updating_observers_ state flag during re-entrant calls to UpdateObservers(). This can allow a DownloadItemImpl object to be destroyed synchronously while an active iteration over its observers is still on the stack, leading to subsequent memory access on the freed object.

Technical Details

In components/download/internal/common/download_item_impl.cc, the UpdateObservers() method uses the is_updating_observers_ boolean flag to guard against re-entrancy and to ensure the object is not destroyed during observer notification. On entry, the flag is set to true, and on exit, it is unconditionally reset to false (line 556).

A vulnerability arises when a nested call to UpdateObservers() occurs. This happens if an observer synchronously triggers the Remove() method of the DownloadItemImpl. The Remove() method itself calls UpdateObservers() (the nested call). When this nested call completes, it resets the is_updating_observers_ flag to false.

Remove() then proceeds to notify its delegate (DownloadManagerImpl), which erases the unique_ptr owning the DownloadItemImpl (content/browser/download/download_manager_impl.cc:1049), triggering the destructor. The destructor ~DownloadItemImpl() contains a CHECK(!is_updating_observers_) designed to prevent destruction during iteration. However, because the nested UpdateObservers() call already reset the flag to false, this check passes, and the object is freed.

When the stack unwinds back to the original (outer) UpdateObservers() call, the code continues execution using the freed this pointer:

  1. The range-for loop continues, accessing the destroyed ObserverList (line 554).
  2. The code performs a UAF write: this->is_updating_observers_ = false (line 556).
  3. Control returns to the original caller (e.g., OnTargetResolved), which continues accessing the freed object (e.g., calling MaybeCompleteDownload()).

Potential Trigger (Android)

On Chrome for Android, a synchronous path to this UAF exists. During target determination, if a download is identified as dangerous, DownloadController::OnDownloadUpdated is called. If the associated WebContents is detached from its WindowAndroid (e.g., during tab manipulation), DangerousDownloadDialogBridge::Show is invoked with a null window, which synchronously calls item->Remove() (chrome/browser/download/android/dangerous_download_dialog_bridge.cc:65).

Suggested Potential Steps to Reproduce

  1. Initiate a download of a file type that triggers a dangerous file warning (e.g., an .apk).
  2. Manipulate the browser state (e.g., by detaching or closing the tab) at the exact moment target determination completes (OnTargetResolved).
  3. This triggers the synchronous removal path on Android, causing the UAF in the browser process.

Note: These are potential steps; our tooling agent does not yet have the ability to run code or provide a functional PoC.

Suggested Fix

To prevent this issue, the is_updating_observers_ flag should be managed in a way that respects nesting (e.g., using a re-entrancy counter or base::AutoReset<bool>). Additionally, the destruction of DownloadItemImpl should be deferred if a notification loop is currently active on the stack. The Remove() implementation should be audited to ensure that deletion via the delegate is never performed synchronously during an observer update.

Evaluated with Chrome root at commit: 29093e11cf509e3593f6229e4b1b075cca356049


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

Likely the is_updating_observers_ flag is reset by a nested UpdateObservers call, so the destructor's check passes and the object is freed while the outer observer loop is still active.

Impact

A use-after-free write in the browser process could lead to memory corruption, potentially allowing code execution, though the report only describes a potential trigger and no working exploit.

What the attacker needed

Chrome for Android; Download a dangerous file type; Detach or close tab at target resolution

The fix

The flag should be managed with a re-entrancy counter or scoped reset, and destruction should be deferred while a notification loop is active; the text does not state that a fix was applied.

How it was found

  1. Initiate a download of a file type that triggers a dangerous file warning (e.g., an .apk).
  2. Manipulate the browser state (e.g., by detaching or closing the tab) at the exact moment target determination completes (OnTargetResolved).
  3. This triggers the synchronous removal path on Android, causing the UAF in the browser process.

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 memory bug where a program keeps using an object after it has been deleted. Here, a download item is deleted while a loop is still notifying observers about it, so the loop later touches freed memory. This can crash the browser or, in theory, let an attacker run code.

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.