Inappropriate implementation in Views (CVE-2024-11114)
A compromised renderer could call the startDragging Mojo interface with arbitrary screen coordinates and a touch event source, causing Chromium on Windows to synthesise mouse clicks at those coordinates via the Windows API. This allowed an attacker to move the user's mouse and click outside the browser window, for example on a downloaded executable in the download bubble, leading to code execution outside the sandbox.
- Fix shipped in 42 days
Steps to reproduce the problem
- git apply patch.diff
- Compile a.cpp into a.exe and put a.exe to the http server folder
- python3 -m http.server
- visit exp.html and click the button then you will see your mouse automatically click the exe in the download bubble and execute it.
Problem Description
startDragging[1] is a mojo ipc interface that can be called at will by the compromised renderer. In Windows, if the user passes arbitrary coordinates and kTouch as the last parameter[2], as can be seen from the code[3][4] below, startDragging will control the user's mouse to click the coordinates using the windows api ui::SendMouseEvent, regardless of whether the coordinates are in the Chromium window.
StartDragging(DragData drag_data, ---------------------[1]
AllowedDragOperations operations_allowed,
skia.mojom.BitmapN32? image,
gfx.mojom.Vector2d cursor_offset_in_dip,
gfx.mojom.Rect drag_obj_rect_in_dip,
DragEventSourceInfo event_info);----------[2]
struct DragEventSourceInfo {
gfx.mojom.Point location;
ui.mojom.DragEventSource source;
};
void DesktopWindowTreeHostWin::StartTouchDrag(gfx::Point screen_point) { -----------------[3]
// Send a mouse down and mouse move before do drag drop runs its own event
// loop. This is required for ::DoDragDrop to start the drag.
ui::SendMouseEvent(screen_point, MOUSEEVENTF_LEFTDOWN | MOUSEEVENTF_ABSOLUTE);
ui::SendMouseEvent(screen_point, MOUSEEVENTF_MOVE | MOUSEEVENTF_ABSOLUTE);
in_touch_drag_ = true;
}
void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) { --------------------[4]
if (in_touch_drag_) {
in_touch_drag_ = false;
ui::SendMouseEvent(screen_point, MOUSEEVENTF_LEFTUP | MOUSEEVENTF_ABSOLUTE);
}
}
exploit: There are many ways to exploit this vulnerability, such as allowing the browser to grant arbitrary user permissions. The most destructive way to exploit is to let the mouse directly click on the downloaded exe file in download bubble to execute it, causing arbitrary code execution outside the sandbox.
Additional Comments
bisect information: This bug is introduced by: https://chromium-review.googlesource.com/c/chromium/src/+/3069450
Summary
Compromised renderer can control your mouse and escape sbx
Custom Questions
Type of crash:
Crash state:
Reporter credit:
Micky
Additional Data
Category: Security
Chrome Channel: Not sure
Regression: N/A
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 startDragging Mojo interface accepted arbitrary screen coordinates and a touch event source from the renderer, and the Windows implementation used ui::SendMouseEvent to synthesise mouse events at those coordinates without validating that they were within the browser window.
Impact
A compromised renderer could control the user's mouse and click on a downloaded executable in the download bubble, causing arbitrary code execution outside the sandbox.
What the attacker needed
Compromised renderer; Windows; user has downloaded an executable
How it was found
- Apply the provided patch.
- Compile the provided source file into an executable and place it in the HTTP server folder.
- Start a simple HTTP server.
- Visit the exploit page and click the button.
- Observe the mouse automatically click the executable in the download bubble and execute it.
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 renderer is the part of the browser that runs web pages; if it is compromised, it should not be able to control the whole computer. Here, a compromised renderer could ask the browser to simulate mouse clicks at any screen position, even outside the browser window. That let an attacker make the user's mouse click on a downloaded program and run it, escaping the browser's security sandbox.
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.