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

Use after free in Base (CVE-2026-9886)

A thread-safety flaw in a macOS pasteboard change observer lets the UI thread and a background dispatch queue touch the same unsynchronised callback list at once. The report claims this could corrupt memory and lead to a use-after-free, with a possible sandbox escape and remote code execution in the browser process.

Google Chrome

Originally disclosed on Chrome VRP

Critical View original
  • Fix shipped in 27 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 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 potential Use-After-Free (UAF) exists in the Browser process due to a thread-safety violation in base::mac::PasteboardChangedObserver. Concurrent access to an unsynchronized CallbackList from the UI thread and a macOS background dispatch queue corrupts underlying memory. This could allow a full sandbox escape and arbitrary Remote Code Execution (RCE).

Affected files:

  • base/mac/pasteboard_changed_observation.mm

Estimated timestamp from git blame: 2025-06-23

Conclusion: This report details a potential Use-After-Free (UAF) vulnerability in the Browser process, yielding a highly probable sandbox escape and Remote Code Execution (RCE).

Analysis: The initial logic and parameters regarding DOM-based clipboard event handling and Mojo IPC propagation to the Browser process are validated. ClipboardHostImpl correctly manages observer registration via base::RegisterPasteboardChangedCallback on the UI thread. Concurrently, macOS system pasteboard invalidations correctly trigger the swizzled _CFPasteboardCache setChangeCount: method on an internal background CFPasteboard dispatch queue.

Leaping directly to the final memory transformation: the concurrent execution of UI thread CancelCallback mutations and background thread Notify() iterations fundamentally corrupts the unsynchronized std::list within CallbackListBase. Because the std::list nodes and scoped_refptr<BindStateBase> utilize RAW_PTR_EXCLUSION, MiraclePtr (BackupRefPtr) is completely bypassed. Dereferencing the dangling iterator grants the attacker direct control over the hijacked polymorphic_invoke_ function pointer upon Run(), enabling instantaneous RCE in the Browser process.

Suggested Steps to Trigger (Theoretical): Note: These are potential steps as our tooling agent does not yet have the ability to run code.

  1. The attacker script rapidly cycles navigator.clipboard.addEventListener and removeEventListener.
  2. Standard processing applied for propagating listener state to the Browser UI thread.
  3. Standard processing applied for ambient pasteboard invalidations triggering the macOS background queue.
  4. Concurrent std::list destruction and iteration overlap triggers the UAF, leading to execution hijacking via polymorphic_invoke_.

Suggested Fix: Move the GetCallbackList().Notify() call inside the existing dispatch_async(dispatch_get_main_queue(), ...) block in base/mac/pasteboard_changed_observation.mm to ensure all list accesses remain synchronized on the main thread.

Evaluated with Chrome root at commit: cc901875d53bf4e4fe0e01f02843871da4106e70


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

Likely the pasteboard change notification calls the callback list's Notify() on a background dispatch queue while the UI thread can still add or remove callbacks, with no synchronisation around the shared list.

Impact

The report claims this could allow a full sandbox escape and arbitrary remote code execution in the browser process, though the steps are theoretical and no exploit was run.

What the attacker needed

MacOS build of the browser; attacker-controlled web page; timing between UI and background threads

The fix

The Notify() call should be moved inside the existing block that dispatches to the main queue, so every access to the list happens on the main thread.

How it was found

  1. A script repeatedly adds and removes clipboard event listeners.
  2. The listener state is propagated to the browser UI thread as normal.
  3. System pasteboard changes trigger the macOS background queue as normal.
  4. The list is destroyed and iterated at the same time, causing the use-after-free and control-flow hijack.

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 frees some memory but keeps using it, so an attacker may be able to control what sits there next. Here two parts of the browser, one on the main screen thread and one on a background macOS queue, change the same list of callbacks without a lock, so the list can break. The report is theoretical and the authors say they could not run any 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.