Closed
Bug 1415636
Opened 9 years ago
Closed 8 years ago
Arbitrary local file read through the abuse of "Save Page" and "file:///" URI
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 332676
People
(Reporter: luan.herrera, Unassigned)
Details
(Keywords: dupeme)
Attachments
(1 file)
|
530 bytes,
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Steps to reproduce:
I have noticed that if the user saves a page using "Webpage, Complete", the contents of a file:// URI can also be saved into the disk. This allows an attacker to exfiltrate the data when the user accesses the downloaded page locally through the use of an ajax request.
Reproduced on Ubuntu:
Version -> 56.0.
Steps to reproduce:
1. Access https://lbherrera.github.io/lab/firefox/fileread.html
2. Save the page by clicking in "Save as..." or by pressing Ctrl+S.
3. Select "Webpage, Complete" if it is not selected by default.
4. Save the page and open fileread.html
Actual results:
The page was saved in the disk, including the content of the victim's file:///etc/passwd which could be retrieved by an attacker through the use of an ajax request.
Expected results:
It should not have been possible to download the contents of file:///etc/passwd through the use of "Save Page".
| Reporter | ||
Comment 1•8 years ago
|
||
Hi, any updates on this?
| Reporter | ||
Comment 2•8 years ago
|
||
Hello again, could you give an updated on this bug? Thanks
Updated•8 years ago
|
Group: firefox-core-security
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(dveditz)
Resolution: --- → DUPLICATE
FWIW, it would be dramatically easier to fix this bug than the more generic bug 332676. This bug could be fixed by making the "save as complete" feature simply refuse to pull down any resources from file://.
Possibly that would be as simple as making the save-as feature use the principal of the html page as loadingPrincipal and SEC_ALLOW_CROSS_ORIGIN_DATA_IS_NULL as load policy.
You need to log in
before you can comment on or make changes to this bug.
Description
•