Inappropriate implementation Views (CVE-2026-12031)
A native window move/resize modal loop on Windows allows nested Mojo task execution without setting the global drag-and-drop reentrancy guard. A compromised renderer could programmatically start a drag-and-drop operation during the user's physical click, potentially dropping attacker-controlled content onto privileged UI surfaces.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 13 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: Entering a native window move/resize modal loop on Windows allows nested Mojo task execution via ScopedAllowApplicationTasksInNativeNestedLoop without setting the global drag-and-drop reentrancy guard. A compromised renderer can potentially exploit this window to programmatically initiate a drag-and-drop operation, hijacking the user's ongoing physical click gesture. This can allow an attacker to bypass standard drag-and-drop restrictions and drop payloads onto privileged UI surfaces.
Affected files:
ui/views/win/hwnd_message_handler.ccui/views/widget/desktop_aura/desktop_drag_drop_client_win.cccontent/browser/web_contents/web_contents_view_aura.ccui/base/dragdrop/drag_source_win.cc
Estimated timestamp from git blame: 2024-05-03
Potential Root Cause
On Windows, the process-global drag-reentrancy guard g_is_dragging is utilized inside DesktopDragDropClientWin::StartDragAndDrop (ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc) to prevent unexpected or re-entrant drag-and-drop sessions.
However, during ordinary title bar drags (SC_MOVE) or window resizing (SC_SIZE), Windows enters a native nested modal loop via HWNDMessageHandler::OnSysCommand (ui/views/win/hwnd_message_handler.cc). This loop explicitly enables UI-thread application tasks (such as processing incoming Mojo IPCs) via base::CurrentThread::ScopedAllowApplicationTasksInNativeNestedLoop without setting the g_is_dragging guard:
// ui/views/win/hwnd_message_handler.cc
base::WeakPtr<HWNDMessageHandler> ref(msg_handler_weak_factory_.GetWeakPtr());
base::CurrentThread::ScopedAllowApplicationTasksInNativeNestedLoop allow;
::DefWindowProc(hwnd(), WM_SYSCOMMAND, notification_code,
MAKELPARAM(point.x(), point.y()));
Because g_is_dragging remains false while the modal loop is running and processing incoming tasks, a compromised renderer can programmatically dispatch a LocalFrameHost::StartDragging Mojo IPC. This IPC is successfully dispatched on the UI thread inside the nested DefWindowProc loop.
Potential Trigger Path
Note: Our analysis is static-based, as our tooling currently does not have the ability to run code or dynamically verify the exploit chain.
- User Gesture: The user clicks and holds the title bar (
HTCAPTION) or a resize border of a browser window to move or resize it. Windows sends a synchronousWM_SYSCOMMANDmessage. - Nested Loop Entry:
HWNDMessageHandler::OnSysCommandreceives this, instantiatesScopedAllowApplicationTasksInNativeNestedLoop, and forwards it to::DefWindowProc(hwnd(), WM_SYSCOMMAND, SC_MOVE/SC_SIZE). This enters the OS-level move/size loop with the mouse button held andg_is_draggingset tofalse. - Mojo IPC Injection: A compromised renderer sends a
LocalFrameHost::StartDraggingMojo IPC. Since the nested loop allows processing application tasks, the IPC is processed on the UI thread under the activeDefWindowProcstack. - WebContents Verification Bypass: Inside
WebContentsViewAura::StartDragging(content/browser/web_contents/web_contents_view_aura.cc), the per-WebContentsdrag_security_info_.did_initiate()flag isfalse(passing the reentrancy check). The trusted location check only requires the renderer-chosen screen coordinates to fall inside the content view's bounds and for the content view to be visible—both of which are satisfied. - OLE Hijack: The drag client calls
DesktopDragDropClientWin::StartDragAndDrop. The globalg_is_draggingisfalse, so theCHECK(!g_is_dragging)safety check passes.::DoDragDropis then called with the attacker-controlled data object. - Capture & Drop: Because the user is holding down the left mouse button, Windows COM sees
MK_LBUTTONas active insideDragSourceWin::QueryContinueDrag, allowing the drag loop to run successfully and steal cursor capture. When the user releases the mouse button, the payload (which can contain text, HTML, orjavascript:URLs) is dropped on whatever target is under the cursor (such as the bookmarks bar, other tabs, or external OS applications).
Impact
This is a potential browser-process logic flaw allowing a compromised renderer to hijack an ordinary, benign user gesture (window moving/resizing) and transform it into an arbitrary drag-and-drop operation. This can allow cross-origin data injection, bookmarklet execution via javascript: URLs, and file/download injection without triggering standard user-gesture defenses.
Suggested Fix
To remediate this issue, DesktopDragDropClientWin::StartDragAndDrop should verify whether the host window is currently in a native modal move/resize loop and reject programmatic drag initiation under those conditions. Alternatively, HWNDMessageHandler could expose a state indicating a native move/resize loop is active, which the drag client can query to reject the operation.
Evaluated with Chrome root at commit: fb72408a8493c46bc75fae1c70d03daec96b3040
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 native move/resize modal loop enables application task processing without setting the global drag reentrancy guard, so a renderer-initiated drag IPC is accepted during the loop.
What the attacker needed
Compromised renderer; user holds title bar or resize border; Windows OS
The fix
The drag client should check whether the host window is in a native move/resize loop and reject programmatic drag initiation in that state, or the window handler should expose such a state for the drag client to query.
How it was found
- The user clicks and holds the title bar or resize border, causing Windows to send a synchronous WM_SYSCOMMAND message.
- HWNDMessageHandler::OnSysCommand enters a native modal loop with the mouse button held and the global drag guard false.
- A compromised renderer sends a StartDragging Mojo IPC, which is processed inside the nested loop.
- The per-WebContents drag initiation check passes because the renderer-chosen coordinates are inside the visible content view.
- The drag client calls DoDragDrop because the global guard is false.
- The drag loop runs with the left mouse button active, and on release the payload is dropped on the target under the cursor.
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 you drag a window's title bar, Windows runs a special loop that still lets the browser process messages. The browser has a flag to stop a web page from starting its own drag at the same time, but this loop does not set that flag. A malicious web page could therefore start a drag while you are holding the mouse button, and when you let go, its content might be dropped somewhere you did not intend.
What is UI spoofing?
The interface lies to the user: a framed page catches their clicks, or a browser shows the wrong address or a fake prompt. Paid when it leads to a sensitive action or convincing phishing.