Use after free in WebAppInstalls (CVE-2026-10005)
The macOS app shim process used by Progressive Web Apps lacks a guard that the browser process has, so a Dock menu can keep a pointer to a window that has already been freed. An attacker could reclaim that freed memory and potentially gain code execution in the unsandboxed shim process.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 12 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: AppShimApplication lacks a security guard in sendAction:to:from: that exists in BrowserCrApplication to prevent a Use-After-Free (UAF) condition. This allows a malicious Progressive Web App (PWA) to potentially trigger memory corruption and code execution in the unsandboxed app shim process. The vulnerability occurs when a window is closed while the macOS Dock menu is displaying it, leading to a stale pointer dispatch.
Affected files:
chrome/app_shim/app_shim_application.mmchrome/app_shim/app_shim_application.h
Estimated timestamp from git blame: 2019-01-29
Description
In Chromium on macOS, BrowserCrApplication (the NSApplication subclass for the browser process) overrides -[NSApplication sendAction:to:from:] to implement a security guard against a known Use-After-Free (UAF) condition in AppKit's auto-generated Dock-menu window list.
When a user right-clicks an application's Dock icon, AppKit snapshots the window list to populate the menu. If a window is subsequently closed (e.g., via JavaScript) while the menu is still open, the menu continues to hold a raw pointer to the now-freed NSWindow. Selecting that window from the menu causes AppKit to call _selectWindow: on the freed object. BrowserCrApplication prevents this by verifying that the target window still exists in the application's window list before dispatching the action.
AppShimApplication, the NSApplication subclass used by app shims (including Progressive Web Apps), lacks this override and the corresponding guard. Consequently, selecting a closed window from a PWA's Dock menu results in a potential wild-pointer dispatch via objc_msgSend on the freed memory of a NativeWidgetMacNSWindow object.
Impact
The app shim process runs unsandboxed on macOS (Sandbox::kNoSandbox as defined in sandbox/policy/sandbox_type.cc). By reclaiming the memory of the freed NativeWidgetMacNSWindow with attacker-controlled data, an attacker could potentially gain control of the Objective-C isa pointer. This leads to a potential Remote Code Execution (RCE) primitive within the unsandboxed process, effectively allowing a compromise of the user environment from a PWA.
Potential Reproduction Steps
Note: These steps are based on source code analysis as our tooling does not yet have the ability to run functional exploits.
- Install a PWA in Chrome on macOS.
- In the PWA, open a popup window using
let p = window.open(...). - Right-click the PWA's Dock icon to display the window list.
- While the menu is open, execute
p.close()in the PWA. This causes the browser to send a Mojo message to the shim, which results in the destruction of theNativeWidgetNSWindowBridgeand the deallocation of the correspondingNativeWidgetMacNSWindowobject. - Reclaim the freed memory in the shim process (e.g., by setting
document.titleon remaining windows to trigger allocations that may occupy the freed object's memory slot). - Select the stale popup window entry from the Dock menu.
AppShimApplicationwill attempt to dispatch the_selectWindow:action to the freed/reclaimed object.
Recommendation
Implement the same sendAction:to:from: override in AppShimApplication (located in chrome/app_shim/app_shim_application.mm) as exists in BrowserCrApplication (chrome/browser/chrome_browser_application_mac.mm) to validate that the target of a _selectWindow: action is a valid window in the application's window list.
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.
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 AppShimApplication class does not override sendAction:to:from: to verify the target window is still in the application's window list, unlike BrowserCrApplication.
Impact
An attacker could potentially gain control of the Objective-C isa pointer and achieve code execution in the unsandboxed app shim process, though the report notes the steps come from source analysis and no working exploit was run.
What the attacker needed
MacOS; Chrome with a PWA installed; victim opens a popup and Dock menu; attacker controls memory reuse
The fix
The same sendAction:to:from: override should be added to AppShimApplication so that a _selectWindow: action is only dispatched when the target is a valid window in the application's window list.
How it was found
- Install a PWA in Chrome on macOS.
- Open a popup window from the PWA.
- Right-click the PWA's Dock icon to show the window list.
- Close the popup while the menu is open, freeing the window object.
- Reclaim the freed memory in the shim process with controlled allocations.
- Select the stale popup entry from the Dock menu.
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 memory but keeps using a pointer to it, that is a use-after-free: the pointer now points at memory that may be reused for something else. Here the macOS Dock menu keeps a reference to a window that a web app can close, and the app shim process that handles PWA windows does not check whether the window still exists before acting on it. Because that process is not sandboxed, an attacker who controls the reused memory could potentially run 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.