Skip to content
Race condition Advisory Advanced CVE-2026-19141

Use after free in Resources (CVE-2026-19141)

A shared list of resource handles in the browser's resource bundle is modified on one thread without locking while other threads read it, so a reallocation can free memory still in use. An attacker with a compromised renderer could potentially cause a use-after-free and escape the sandbox, though the report says no working proof of concept exists.

Google Chrome

Originally disclosed on Chrome VRP

  • Fix shipped in 3 months

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 race condition in ui::ResourceBundle allows for a potential Use-After-Free (UAF) in the browser process, particularly on Android. Unsynchronized modification of the resource_handles_ vector during Dynamic Feature Module loading can cause memory reallocation while other threads are iterating the vector. This can result in virtual function calls being made on freed memory, potentially leading to a sandbox escape.

Affected files:

  • ui/base/resource/resource_bundle.cc
  • ui/base/resource/resource_bundle.h
  • ui/base/resource/resource_handle.h

Estimated timestamp from git blame: 2019-10-07

Summary

There is a potential race condition in ui::ResourceBundle due to unsynchronized access to the resource_handles_ vector. While ResourceBundle utilizes a lock for its locale_resources_data_ member, no such protection exists for resource_handles_. On Android, Dynamic Feature Modules (DFMs) such as dev_ui, ar, or vr load their resources at runtime, triggering an unsynchronized push_back on the UI thread. If this modification occurs while other threads (such as the IO thread or ThreadPool workers) are iterating over the same vector to resolve resources, a Use-After-Free (UAF) can occur if the vector reallocates its backing store.

Technical Details

In ui/base/resource/resource_bundle.h, resource_handles_ is defined as a std::vector<std::unique_ptr<ResourceHandle>>.

1. The Writer Path: When an Android DFM is loaded (e.g., via ModuleInstaller), the native resources are registered through ResourceBundle::AddResourceHandle. This method performs a push_back on the vector without any thread synchronization:

C++
// ui/base/resource/resource_bundle.cc
void ResourceBundle::AddResourceHandle(
    std::unique_ptr<ResourceHandle> resource_handle) {
  // ...
  resource_handles_.push_back(std::move(resource_handle)); // No locking
}

2. The Reader Path: Several frequently used methods iterate over this vector, such as GetRawDataResourceForScale and HasDataResource. These methods are called from various threads, including the IO thread (e.g., when generating filesystem:// directory listings via net::GetDirectoryListingHeader) and ThreadPool workers (e.g., when WebUI data sources fetch resources):

C++
// ui/base/resource/resource_bundle.cc
for (const auto& resource_handle : resource_handles_) {
  if (resource_handle->GetResourceScaleFactor() == scale_factor) { // Virtual call
    // ...

3. The Vulnerability: If the UI thread's push_back triggers a vector reallocation, the old backing store is freed. An active iterator or reference on a reader thread then becomes stale. Because ResourceHandle is a polymorphic interface, subsequent virtual calls (like GetResourceScaleFactor) on the freed memory could allow an attacker to hijack control flow within the privileged browser process.

Suggested Attacker Steps

An attacker could potentially trigger this vulnerability from a compromised renderer process:

  1. Initiate a background task that triggers frequent resource lookups on the IO thread, such as repeated requests for filesystem:// URIs.
  2. Simultaneously trigger the loading of an Android Dynamic Feature Module. This can be achieved by requesting a WebXR AR session or navigating the browser to a host served by the dev_ui module (e.g., chrome://gpu).
  3. If the timing is correct, the vector reallocation on the UI thread will collide with the iteration on the IO thread, resulting in a UAF.

Note: These steps are theoretical as we do not currently have a functional proof-of-concept.

Impact

A successful exploit would result in arbitrary code execution within the browser process, which is unsandboxed. This represents a full sandbox escape from a compromised renderer.

Recommended Fix

Access to resource_handles_ should be synchronized using a lock, similar to the existing implementation for locale_resources_data_. Alternatively, consider using a thread-safe container or ensuring all modifications and reads occur on the same sequence, though the latter may have significant performance implications given the current usage of ResourceBundle.

Evaluated with Chrome root at commit: 1a8d40fc44df2088d5945c0bf53584038aa1614a


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 resource_handles_ vector is written to and read from multiple threads without any lock, unlike the separately protected locale_resources_data_ member.

Impact

A successful exploit could give arbitrary code execution in the unsandboxed browser process, a full sandbox escape, but the report notes the steps are theoretical with no functional proof of concept.

What the attacker needed

Compromised renderer process; Android device; precise timing between threads

The fix

Access to resource_handles_ should be synchronised with a lock, or a thread-safe container used, or all reads and writes confined to one sequence.

How it was found

  1. Trigger frequent resource lookups on the IO thread, for example repeated filesystem:// requests.
  2. At the same time trigger loading of an Android Dynamic Feature Module, such as by requesting a WebXR AR session or visiting a dev_ui-served page.
  3. If the timing lines up, the vector reallocation collides with the reader thread's iteration and causes a use-after-free.

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.

The browser keeps a list of resource files it can load. One part of the browser adds to this list while other parts are reading it, and if the list grows at the wrong moment the memory being read is thrown away, leaving readers looking at freed memory. An attacker who already controls a web page's rendering process might use that to run code in the more privileged browser process.

What is Race condition?

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.

More from Google Chrome

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.