.url download via saving a response in DevTools lead to arbitrary file read
Firefox's 'Save Response As' feature in DevTools allows saving a response with a dangerous file extension such as .url or .lnk without appending a .download suffix. An attacker could use this to trick a user into downloading a malicious .url file that, when opened, may lead to arbitrary file read on a Windows machine.
Originally disclosed on Mozilla
- Fixed in 5 days
- Paid in 9 days
- Disclosed after 5 days
Created attachment 9467938
firefox-saveasresponse-fileread.mp4
HI Team, Firefox is vulnerable for downloading dangerous extension such as .url, .lnk etc
These issues are already fixed in many save as areas by appending a .download to the file extension
My Bug Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1809923
Issue is in Save Response As Feature
Steps to Reproduce
1. Visit the vulnerable page
2. click f12 and save the request using Save Response As
3. You can see the .url extension is downloaded now.
We can use this to read arbitrary files from the windows machine.
I have attached the poc video and html,.url files used in the poc for reference
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 'Save Response As' feature in Firefox DevTools does not apply the same extension-hardening (appending .download) that other save paths use for dangerous file types.
Impact
An attacker could craft a page that, when its response is saved via DevTools, delivers a .url file that may lead to arbitrary file read on the victim's Windows machine.
What the attacker needed
Victim uses Firefox DevTools; victim saves a response via 'Save Response As'; victim opens the downloaded .url file
How it was found
- Visit the vulnerable page.
- Open DevTools (F12) and use 'Save Response As' on a request.
- Observe that the file is saved with a .url extension instead of a safe one.
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 save a file from a website, the browser usually adds a safe extension like .download to risky file types to prevent them from running automatically. Here, Firefox's developer tools let you save a response as a .url file without that protection. A .url file can point to a local file or a malicious script, so opening it could let an attacker read files on your computer.
What is File upload?
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.