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

Use after free in WebAppInstalls (CVE-2026-9990)

A use-after-free was identified in the macOS browser process during the app shim launch sequence, where a cancelled launch can destroy internal state objects while raw pointers to them remain on the stack. An attacker could potentially achieve arbitrary code execution in the unsandboxed browser process, though no working proof of concept was executed.

Google Chrome

Originally disclosed on Chrome VRP

  • 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 potential Use-After-Free (UAF) vulnerability exists in the macOS browser process due to synchronous reentrancy during the app shim launch sequence. If a launch is cancelled synchronously (for example, due to a disallowed protocol handler), internal state objects can be destroyed while raw pointers to them are still being processed on the stack. Subsequent dereferences of these dangling pointers result in a UAF in the unsandboxed browser process.

Affected files:

  • chrome/browser/apps/app_shim/app_shim_manager_mac.cc
  • chrome/browser/apps/app_shim/web_app_shim_manager_delegate_mac.cc

Estimated timestamp from git blame: 2021-09-15

Description

A potential Use-After-Free (UAF) vulnerability has been identified in the AppShimManager component on macOS. The issue arises from synchronous reentrancy during the app shim launch process. Specifically, the AppShimManager maintains bare pointers to ProfileState objects on the stack. If a launch is cancelled synchronously, these objects can be erased from their owning maps and destroyed, leaving the stack pointers dangling. Subsequent dereferences of these pointers lead to a UAF.

Technical Details

In chrome/browser/apps/app_shim/app_shim_manager_mac.cc, the method LoadAndLaunchApp_OnProfilesAndAppReady manages the launch of app shims. It retrieves or creates a ProfileState and stores it in a bare local pointer:

C++
ProfileState* profile_state = nullptr;
if (delegate_->AppCanCreateHost(profile, params.app_id)) {
  profile_state = GetOrCreateProfileState(profile, params.app_id);
}
LoadAndLaunchApp_LaunchIfAppropriate(profile, profile_state, params,
                                     launch_finished.Release());

The call to LoadAndLaunchApp_LaunchIfAppropriate eventually invokes delegate_->LaunchApp. In chrome/browser/apps/app_shim/web_app_shim_manager_delegate_mac.cc, if the application is launched via a protocol that the user has previously disallowed and marked as "remembered", the delegate synchronously cancels the launch:

C++
if (registrar.IsDisallowedLaunchProtocol(app_id, protocol_url.GetScheme())) {
  CancelAppLaunch(profile, app_id);
  return;
}

The CancelAppLaunch call flows back into AppShimManager::OnAppLaunchCancelled, which calls OnAppDeactivated. If there are no active browser windows for the app (which is common during a fresh launch sequence), OnAppDeactivated removes the ProfileState from its containing map, causing it to be deleted:

C++
app_state->profiles.erase(found_profile); // Immediately destroys ProfileState
if (app_state->ShouldDeleteAppState()) {
  apps_.erase(found_app);                // Immediately destroys AppState
}

When control returns to LoadAndLaunchApp_OnProfilesAndAppReady, the profile_state pointer is dangling. It is subsequently passed to OnShimProcessConnectedAndAllLaunchesDone, where it is dereferenced:

C++
DCHECK(profile_state);
AppShimHost* host = profile_state->GetHost(); // UAF read

This vulnerability is not mitigated by MiraclePtr because the affected pointers are bare pointers on the stack, and the objects are destroyed via their owner's erasure from a map during the reentrant call.

Potential Attack Scenario

  1. Preparation: An attacker induces a user to install a Progressive Web App (PWA) that registers a custom protocol handler (e.g., web+evil://).
  2. Initial Interaction: The user clicks a web+evil:// link. When the Chrome protocol handler permission dialog appears, the user selects "Don't Allow" and "Remember my choice".
  3. Trigger: The user is induced to click another web+evil:// link. Due to the asynchronous nature of OS integration updates on macOS, the app shim may still be launched by the OS.
  4. Execution: The browser process receives the connection from the shim. During the launch sequence, the manager identifies the protocol as disallowed. This triggers the synchronous cancellation path, destroying the ProfileState. The browser process then dereferences the dangling pointer.

Note: These steps are based on a source code analysis; a functional proof-of-concept has not been executed.

Impact

This is a potential high-severity UAF in the browser process. Successful exploitation could allow an attacker to achieve arbitrary code execution in the context of the unsandboxed browser process on macOS.

Suggested Fix

Avoid performing synchronous deletions of ProfileState or AppState objects during the launch sequence. Deletions in OnAppDeactivated should be made asynchronous (e.g., via base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask) when triggered during a launch, or the AppShimManager should use base::WeakPtr to track the lifetime of these objects safely across reentrant calls.

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 synchronous reentrancy: a cancellation callback deletes the ProfileState from its owning map while the caller still holds a bare stack pointer to it.

Impact

Successful exploitation could allow arbitrary code execution in the unsandboxed browser process on macOS, but the report notes no functional proof of concept was executed.

What the attacker needed

MacOS; victim installs a PWA with a protocol handler; victim denies and remembers the prompt; victim clicks a second link

The fix

Deletions during the launch sequence should be made asynchronous or the manager should track object lifetimes with weak pointers.

How it was found

  1. An attacker gets the user to install a PWA that registers a custom protocol handler.
  2. The user clicks a link using that protocol and chooses to deny and remember the choice.
  3. The user clicks another such link, and the OS may still launch the app shim.
  4. The browser receives the shim connection, sees the protocol is disallowed, and cancels synchronously.
  5. The cancellation destroys the ProfileState, and the browser then dereferences the dangling pointer.

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.

When a program frees an object from memory but keeps a pointer to it and later uses that pointer, it is called a use-after-free. Here, a launch being cancelled partway through deletes some internal bookkeeping while the code still holds a reference to it, so the next use reads freed memory. Because this happens in the browser process, which is not sandboxed on macOS, a skilled attacker might turn it into running their own 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.