Web content can open local files and local folders using drag & drop event
A web page could open local files and folders when a user dragged a link onto the address bar or tab bar. An attacker could use this to read local directory contents, such as /etc/.
Originally disclosed on Mozilla
- Fixed in 22 days
- Paid in 28 days
- Disclosed after 22 days
Created attachment 8948559
testcase-drag-drop-local-file-opening.html
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20180128191252
Steps to reproduce:
-1: Open the Test case in Attachments with Firefox.
-2: Try to Drag and drop the link https://www.bankofamerica.com/ into the Addressbar or Tab bar.
Actual results:
Firefox loads the local folder: File:///etc/ .
(I will upload a demonstration video)
Expected results:
The testcase works on Firefox 58.0.1 and also on Firefox Beta 59.0b6.
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 drag-and-drop handler did not properly validate or sanitise the dropped URL, allowing a file:// URL to be loaded.
What the attacker needed
Victim uses Firefox; victim drags a link to address or tab bar
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 into Firefox's address bar, the browser is supposed to navigate to that link. Here, a specially crafted web page could make Firefox open a local folder on your computer instead, which could let a malicious site peek at files on your machine.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.