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

Use after free in XR (CVE-2026-9890)

A data race exists on the global command line singleton, which is mutated on the UI thread via WebXR calls while being read concurrently on the process-launcher thread. Because the underlying containers are not thread-safe, a compromised renderer could trigger a use-after-free in the unsandboxed browser process, potentially leading to a sandbox escape.

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 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 data race exists in the browser process where the global base::CommandLine singleton is mutated on the UI thread via WebXR while being read concurrently on the process-launcher thread. Because base::CommandLine uses unsynchronized std::map and std::vector containers, this concurrent access can lead to a Use-After-Free (UAF) or memory corruption. The vulnerability is reachable from a compromised renderer and impacts the unsandboxed browser process.

Affected files:

  • content/browser/xr/service/xr_runtime_manager_impl.cc
  • base/command_line.cc
  • content/browser/child_process_launcher_helper.cc
  • content/browser/child_process_launcher_helper_win.cc
  • sandbox/policy/win/sandbox_win.cc
  • base/command_line.h

Estimated timestamp from git blame: 2020-06-17

Summary

A data race on the base::CommandLine singleton allows for a potential Use-After-Free (UAF) in the unsandboxed browser process. The race occurs because the global command line is modified on the UI thread (triggered by WebXR Mojo calls) while being accessed on the dedicated process-launcher thread during child process launches.

Root Cause Analysis

In base/command_line.h, command-line switches and arguments are stored in switches_ (std::map) and argv_ (std::vector). These containers are not thread-safe. Although base::CommandLine includes an InstanceBoundSequenceChecker, it is typically compiled out in production builds. Consequently, mutators like AppendSwitch and RemoveSwitch modify the containers without synchronization, which can cause tree rebalancing or node deletions while other threads are traversing the map.

Vulnerability Details

The Writer (UI Thread)

In content/browser/xr/service/xr_runtime_manager_impl.cc, the MakeXrCompatible method appends a switch to the global command line when a compatible GPU adapter LUID is identified:

C++
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
    switches::kUseAdapterLuid, luid_string);

Additionally, the destructor XRRuntimeManagerImpl::~XRRuntimeManagerImpl removes this switch:

C++
base::CommandLine::ForCurrentProcess()->RemoveSwitch(switches::kUseAdapterLuid);

The Reader (Launcher Thread)

Every child process launch (renderer, GPU, utility, etc.) involves reading the global CommandLine singleton on a dedicated thread pool thread (the launcher thread). Functions like internal::ChildProcessLauncherHelper::LaunchOnLauncherThread perform multiple reads using HasSwitch or GetSwitchValueASCII (e.g., in content/browser/child_process_launcher_helper.cc at line 315).

Impact

Concurrent mutation and traversal of a std::map is undefined behavior. In libc++, this can cause a reader thread to follow pointers of nodes that are being freed or rotated, leading to a browser-process UAF. Because libc++ tree nodes and std::string buffers use bare pointers rather than raw_ptr<>, MiraclePtr does not provide protection for this specific case. A UAF in the browser process is a critical security issue that could lead to a sandbox escape.

Suggested Reproductions Steps (Potential)

  1. From a compromised renderer, repeatedly invoke navigator.xr.makeXRCompatible() and immediately drop the Mojo connection to trigger frequent AppendSwitch and RemoveSwitch calls on the UI thread.
  2. Simultaneously, trigger frequent child process launches (e.g., by creating many cross-site iframes) to force concurrent reads of the CommandLine singleton on the launcher thread.
  3. Observe for memory corruption or crashes in the browser process resulting from the data race on the switches_ map.

Suggested Fix

Operations on the global base::CommandLine singleton should be synchronized using a lock, or the singleton should be made immutable after initialization. If runtime mutations are required, they should be performed on a thread-safe wrapper or protected by a global mutex.

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.

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 global command line singleton stores its switches and arguments in unsynchronised standard containers, and its sequence checker is compiled out in production, so concurrent mutation and traversal is undefined behaviour.

Impact

A use-after-free in the browser process is a critical issue that could lead to a sandbox escape, though the text only offers potential reproduction steps and no confirmed exploit.

What the attacker needed

Compromised renderer; WebXR support available

The fix

Operations on the global command line singleton should be synchronised with a lock, or the singleton should be made immutable after initialisation.

How it was found

  1. From a compromised renderer, repeatedly call the WebXR compatibility method and drop the connection to force frequent switch additions and removals on the UI thread.
  2. At the same time, trigger many child process launches, for example by creating many cross-site iframes, to force concurrent reads on the launcher thread.
  3. Watch for memory corruption or crashes in the browser process caused by the race on the switches map.

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 program keeps a shared list of settings (the command line) that many parts of the browser read. One part can change that list while another part is reading it at the same time, which can make the reader use memory that has just been freed. If an attacker can trigger this repeatedly, the browser process itself may crash or be taken over, and that process is not sandboxed.

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.