requestPointerLock on iFrame src from different origin able to move the cursor out of viewport
When pointer lock was requested on a cross-origin iframe in Firefox with Fission enabled, the cursor could escape the viewport and move over browser chrome such as the permission panel. An attacker could position the pointer over the 'Allow' button so that a user's double click also granted a geolocation permission without realising it.
Originally disclosed on Mozilla
- Fixed in 2.5 years
- Paid in 9 months
- Disclosed after 2.5 years
Created attachment 9252792 rpl-geolocation-windows.html
After invoke requestPointerLock on iframe src from different origin, surprisingly on Fission enabled the cursor or pointer will move outside viewport including to toolbar, permission panel, desktop, taskbar, and more.
On the attached testcase I able to move user pointer to "Allow" button on permission panel, so when user double click the box, user will unaware it also click "Allow" button to allow Geolocation permission.
Tested on:
- Firefox Nightly 96.0a1 (2021-11-28) (64-bit) on Windows 11 (with screen resolution 1920x1080)
- Firefox Nightly 96.0a1 (2021-11-28) (64-bit) on Arch Linux (with screen resolution 2560x1440)
Steps to reproduce:
- Visit attached rpl-geolocation-windows.html
- Click "Launch" button
- Double click the box
- Geolocation permission is now allowed
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 pointer lock implementation did not confine the locked pointer to the iframe's viewport when the iframe was cross-origin under Fission, so synthetic pointer movement reached browser UI.
Impact
A user could be tricked into granting a geolocation permission they did not intend to give, because the pointer could be moved onto the browser's own 'Allow' button; the report only demonstrates this on Firefox Nightly with Fission enabled.
What the attacker needed
Firefox Nightly with Fission enabled; victim double clicks the page box; cross-origin iframe used for pointer lock
How it was found
- Open the attached test page in Firefox Nightly with Fission enabled.
- Click the 'Launch' button to start the test.
- Double click the box on the page.
- Observe that the geolocation permission becomes allowed.
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.
Pointer lock is a browser feature that hides the cursor and lets a page track mouse movement, usually for games. Here, when the page asking for it was embedded from another site, the hidden cursor could still be moved over parts of the browser window that belong to the browser itself, like a permission popup. That let a page trick a user into clicking a button they did not mean to press.
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.