Skip to content
CSRF Disclosed report Intermediate CVE-2023-23601

Drag-and-drop of a URL from inside a cross-origin iframe should not be allowed to drop in the same tab (cross-origin attacks and spoofs)

Dragging a URL from a cross-origin iframe and dropping it outside the iframe in the same tab causes navigation, sending all cookies including SameSite=Strict. An attacker could use this to bypass SameSite protections and perform cross-site GET requests with cookies.

Luan Herrera Follow

Originally disclosed on Mozilla

  • Fixed in 2 months
  • Paid in 2 months
  • Disclosed after 2 months
Text
Created attachment 9297700
index.html

I was testing and comparing the drag-and-drop functionality between browsers and noticed an odd behavior:
1. If a user performs a drag of a URL from inside a same-origin iframe and drops it outside of the iframe, no navigation is performed.
2. If a user performs a drag of a URL from inside a cross-origin iframe and drops it outside of the iframe, a navigation is performed.

This navigation ends up sending all the user's cookies in the request (Lax, Strict, and None), which defeats the purpose of SameSite Cookies on Strict mode for GET requests as this turns all drag-and-drops into potentially untrustworthy actions.

Note that no navigation is made on Google Chrome and Safari.
I have also attached a video reproducing the attack.

VERSION
Version: 105.0 (64-bit).
Operating System: Ubuntu 20.04

REPRODUCTION CASE
1. Download "index.html" and serve the file through a web server.
2. Access https://lbherrera.github.io/lab/setCookies.html to set different SameSite Cookies on the victim's page (Lax, Strict, and None).
3. Access http://localhost/index.html
4. Try to scroll the page down by dragging the scroll bar and then drop it.
5. You will be redirected to https://lbherrera.github.io/lab/getCookies.html and it will display which cookies it received (Lax=true; Strict=true; None=true).

CREDIT INFORMATION
Reporter credit: Luan Herrera (@lbherrera_)

The original report as published on Mozilla's Bugzilla, by Luan Herrera. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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 browser does not properly restrict drag-and-drop navigation initiated from a cross-origin iframe, allowing a top-level navigation that includes cookies regardless of SameSite settings.

What the attacker needed

Victim uses Firefox; victim drags and drops a URL from a cross-origin iframe

How it was found

  1. Serve the provided index.html file through a web server.
  2. Visit a page that sets SameSite cookies (Lax, Strict, None) on the victim's browser.
  3. Access the served index.html page.
  4. Drag the scroll bar and drop it.
  5. Observe redirection to a page that displays the received cookies, showing all three types were sent.

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 link from one website embedded in another and drop it on the page, the browser normally should not navigate. Here, if the embedded site is from a different origin, the browser navigates and includes all cookies, even those marked to be sent only in same-site requests. This means a malicious site could trick you into making a request with your cookies.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by Luan Herrera

View all

11 more disclosed reports, best first.

More from Mozilla

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.