Improper initialization in Views (CVE-2026-87616)
A Windows-specific flag that blocks renderer-initiated drag-and-drop during a native move/resize loop was only set on the first resize or move message, not when the loop began. A compromised renderer could therefore start an OS-level drag with attacker-controlled data in the brief window after a user clicks a resize border but before moving the mouse.
Google Chrome
Originally disclosed on Chrome VRP
- Fix shipped in 3 months
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: A potential logic flaw exists in the Windows-specific window resize/move tracking where the global state tracking flag g_in_move_resize_loop is set on the first WM_SIZING/WM_MOVING message rather than on WM_ENTERSIZEMOVE. A compromised renderer can potentially exploit this timing window to bypass the drag-and-drop prevention check (IsInNativeMoveResizeLoop()) when a user clicks a resize border but has not yet moved the mouse. This could allow the renderer to initiate an unauthorized OS-level drag-and-drop operation with attacker-controlled payloads.
Affected files:
ui/views/win/user_resize_move_detector.ccui/views/widget/desktop_aura/desktop_drag_drop_client_win.ccui/views/win/hwnd_message_handler.cc
Estimated timestamp from git blame: 2026-06-04
Description
In Chromium on Windows, a protection is implemented in DesktopDragDropClientWin::StartDragAndDrop to block renderer-initiated drag-and-drop operations while the desktop window is in a native move/resize modal loop:
// ui/views/widget/desktop_aura/desktop_drag_drop_client_win.cc
if (desktop_host_->IsInNativeMoveResizeLoop()) {
return ui::PreferredDragOperation(
ui::DragDropTypes::DropEffectToDragOperation(DROPEFFECT_NONE));
}
This check relies on UserResizeMoveDetector::InMoveResizeLoop(), which returns a file-static boolean g_in_move_resize_loop defined in ui/views/win/user_resize_move_detector.cc. However, review of the codebase indicates a logic gap in how this state is initialized and updated:
// ui/views/win/user_resize_move_detector.cc
static bool g_in_move_resize_loop = false;
void UserResizeMoveDetector::OnEnterSizeMove() {
if (state_ == State::kNotResizing) {
state_ = State::kInSizeMove; // ← Does not set g_in_move_resize_loop
}
}
void UserResizeMoveDetector::OnSizing() {
if (state_ == State::kInSizeMove) {
g_in_move_resize_loop = true; // ← Set here on first resize/move message
state_ = State::kInSizing;
hwnd_delegate_->HandleBeginUserResize();
}
}
When a user clicks a window resize border, Windows enters the native modal loop, dispatching a WM_ENTERSIZEMOVE message which triggers OnEnterSizeMove(). However, the g_in_move_resize_loop flag remains false until the first WM_SIZING or WM_MOVING message is dispatched, which requires the user to actually move the mouse cursor after clicking. This creates a potential window of opportunity where the native move/resize loop is active, but the protection predicate is still false.
Potential Attack Scenario
Although our automated tooling has not yet executed a dynamic proof-of-concept, the static code path suggests the following potential exploit flow:
- Renderer Preparation: A compromised renderer continuously posts
LocalFrameHost::StartDraggingIPC messages with a maliciousDragDatapayload and setting the source tokMouse. - User Interaction: The user clicks and holds the left mouse button down on a window resize border (triggering hit-tests such as
HTLEFTorHTRIGHT). - Modal Loop Entry: The click is processed via
DefWindowProc(WM_NCLBUTTONDOWN), synchronously entering the native modal loop. The loop dispatchesWM_ENTERSIZEMOVEwhich transitionsUserResizeMoveDetectortoState::kInSizeMove, butg_in_move_resize_loopremainsfalse. - Task Dispatching: The native modal loop uses
ScopedAllowApplicationTasksInNativeNestedLoopto allow application tasks to run. One of the queuedStartDraggingMojo IPC tasks from the compromised renderer is processed on the UI thread. - Check Bypass:
DesktopDragDropClientWin::StartDragAndDropis reached. The call todesktop_host_->IsInNativeMoveResizeLoop()evaluatesg_in_move_resize_loop(which is stillfalse), bypassing the guard. - OS-Level Drag: The browser calls the blocking Win32 API
::DoDragDrop(). Since the user is holding down the left mouse button, the drag loop persists. When the user moves and releases the mouse button, the drop action is completed with the attacker's payload.
Suggested Fix
To close this logic gap and prevent any potential bypass, g_in_move_resize_loop should be set to true immediately when the modal loop begins, within UserResizeMoveDetector::OnEnterSizeMove():
void UserResizeMoveDetector::OnEnterSizeMove() {
if (state_ == State::kNotResizing) {
state_ = State::kInSizeMove;
g_in_move_resize_loop = true; // Set to true immediately upon entering size/move loop
}
}
Evaluated with Chrome root at commit: e9507a33bb4148ee071aaaf8a7e9ad68770359bf
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 global guard flag was set in the resize/move message handler instead of when the native modal loop is entered, leaving a timing gap.
Impact
A compromised renderer could potentially start an unauthorised OS-level drag-and-drop with attacker-controlled data, though no dynamic proof-of-concept was executed.
What the attacker needed
Compromised renderer; user clicks a resize border; Windows
The fix
The flag should be set to true immediately when the modal loop begins, inside the enter-size-move handler.
How it was found
- A compromised renderer repeatedly sends StartDragging messages with a malicious payload.
- The user presses and holds the left mouse button on a window resize border.
- The click enters the native modal loop, but the guard flag stays false.
- A queued StartDragging task runs on the UI thread and passes the check.
- The browser calls the OS drag API, and the drop completes with the attacker's payload when the user releases the mouse.
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 click and hold a window's edge to resize it, Windows pauses normal handling and runs a special loop until you let go. Chromium tries to block a compromised web page from starting a drag-and-drop during that loop, but the block only switched on once you actually moved the mouse. So a malicious page could sneak a drag in during that short gap.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.