Use after free in Views (CVE-2026-11117)
A use-after-free flaw in Chrome's Windows browser process arises from duplicate entries in a fullscreen monitor map, where only one entry is removed on window destruction, leaving a dangling pointer. An attacker could potentially trigger the dangling pointer dereference by manipulating window movement and fullscreen requests, leading to remote code execution.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 54 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.
Overview: A potential Use-After-Free (UAF) exists in the Windows browser process due to improper management of the fullscreen_monitor_map_. External window movements combined with multi-monitor fullscreen requests can create duplicate map entries, only one of which is cleaned up on destruction. The remaining dangling raw pointer is dereferenced when another window on that monitor is activated.
Affected files:
ui/views/win/hwnd_message_handler.ccui/views/win/hwnd_message_handler.h
Estimated timestamp from git blame: 2026-02-28
Description
A potential Use-After-Free vulnerability exists in the Windows Browser process within ui/views/win/hwnd_message_handler.cc.
HWNDMessageHandler uses a static map (fullscreen_monitor_map_) to track fullscreen windows per monitor (std::map<HMONITOR, HWNDMessageHandler*>). This map explicitly uses bare pointers.
There are two logical flaws that combine to create the UAF:
- Incomplete Removal during
SetFullscreen: When transitioning to fullscreen,HWNDMessageHandler::SetFullscreenattempts to remove any prior entry for the window by looking up its current monitor handle (::MonitorFromWindow). If the window was previously made fullscreen on Monitor A, but then moved by the OS (e.g., via theWin+Shift+Arrowshortcut) to Monitor B, the window's current monitor is B. A subsequent call toSetFullscreen(e.g., targeting Monitor C via the Window Management API) will fail to find and erase the old entry for Monitor A, and will insert a new entry for Monitor C. The map now contains duplicate entries for the same handler object. - Incomplete Cleanup during Destruction: When the window is destroyed,
HWNDMessageHandler::OnDestroycallsRemoveCurrentWindowFromFullscreenMonitorMap(). This function searches the map by value to remove the handler. However, it usesstd::ranges::find, which only returns the first matching iterator, and erases it without looping. If duplicate entries exist, only the first is removed, leaving a dangling pointer in the global map.
When another Chrome window on the affected monitor receives focus, CheckAndHandleBackgroundFullscreenOnMonitor looks up the dangling pointer by its monitor handle. It calls iter->second->hwnd() and the virtual method iter->second->OnBackgroundFullscreen(), leading to a UAF dereference and potential Remote Code Execution (RCE) in the browser process.
Note: HWNDMessageHandler utilizes ADVANCED_MEMORY_SAFETY_CHECKS, which provides a scheduler loop quarantine. However, an attacker can reliably outlive this quarantine before triggering the vulnerability. Furthermore, because the map uses raw pointers rather than raw_ptr, MiraclePtr (BRP) does not protect this specific reference.
Theoretical Reproduction Steps
Please note: These are suggested/potential steps based on code analysis, as our tooling agent cannot execute live code.
- Prerequisites: The user has a Windows setup with at least three monitors (Monitor A, Monitor B, Monitor C).
- A malicious web page opens a popup/window on Monitor A and calls
element.requestFullscreen(). - The user moves the fullscreen window to Monitor B using the OS shortcut (
Win+Shift+Right Arrow). Chrome's map is not updated; it still tracks the window on Monitor A. - The malicious web page calls
element.requestFullscreen({ screen: monitor_c_details })to transition the window to Monitor C.- Chrome checks the map for Monitor B (the current monitor), finds nothing, and erases nothing.
- Chrome moves the window and adds a new entry for Monitor C. The map now contains both
{Monitor A -> Handler}and{Monitor C -> Handler}.
- The malicious web page calls
window.close(), destroying the window.RemoveCurrentWindowFromFullscreenMonitorMap()executes, finding and erasing only the first matching entry (e.g., Monitor A).- The entry for Monitor C remains in the map as a dangling pointer.
- The attacker waits for the scheduler loop quarantine to expire, performing heap grooming to replace the freed
HWNDMessageHandlerobject. - The user focuses or clicks any other Chrome window located on Monitor C.
- The
WM_ACTIVATEmessage fires, triggeringCheckAndHandleBackgroundFullscreenOnMonitor, which dereferences the dangling pointer and executes the attacker's payload.
Suggested Fix
- Fix Cleanup Logic: Update
RemoveCurrentWindowFromFullscreenMonitorMap()inui/views/win/hwnd_message_handler.ccto usestd::erase_ifor a loop to ensure all map entries matchingthisare removed, rather than just the first one. - Use Smart Pointers: Refactor
FullscreenWindowMonitorMapto usebase::raw_ptr<HWNDMessageHandler>orbase::WeakPtr<HWNDMessageHandler>to benefit from MiraclePtr protections or automatic invalidation. - Fix Update Logic: In
SetFullscreen, instead of only erasing the entry for the current monitor, it may be safer to callRemoveCurrentWindowFromFullscreenMonitorMap()to ensure any stale entries for this instance are cleared before adding the new monitor mapping.
Evaluated with Chrome root at commit: 096fc8fdbfacf2546485756d03f160a3d04fcc9b
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.
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
The map uses raw pointers and cleanup only removes the first matching entry, so duplicate entries created by moving a fullscreen window between monitors leave a dangling pointer.
Impact
The dangling pointer dereference could lead to remote code execution in the browser process, though the report notes that ADVANCED_MEMORY_SAFETY_CHECKS provides a quarantine that an attacker can outlive.
What the attacker needed
Windows with at least three monitors; victim visits malicious page; user moves window between monitors
The fix
The cleanup logic should be updated to remove all map entries matching the handler, and the map should use smart pointers or weak references to prevent dangling pointers.
How it was found
- A malicious web page opens a popup on Monitor A and requests fullscreen.
- The user moves the fullscreen window to Monitor B using the OS shortcut.
- The malicious page requests fullscreen on Monitor C, causing a duplicate map entry.
- The malicious page closes the window, leaving a dangling pointer for Monitor C.
- The attacker waits for the quarantine to expire and performs heap grooming.
- The user focuses any Chrome window on Monitor C, triggering the 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.
A use-after-free happens when a program keeps a reference to memory after it has been freed, and later uses it as if it were still valid. Here, Chrome tracks which window is fullscreen on which monitor, but a bug leaves a stale reference behind. If an attacker can control when that stale reference is used, they might run their own code on the victim's computer.
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.