Closed
Bug 395752
Opened 17 years ago
Closed 6 years ago
save web page complete allows stealing local files on trunk
Categories
(Core :: Security, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 332676
People
(Reporter: guninski, Assigned: dveditz)
References
Details
(Keywords: sec-moderate, Whiteboard: [sg:moderate])
Attachments
(1 file)
(deleted),
text/html
|
Details |
trunk has ongoing protection against stealing local files when a local
file is opened.
this may be circumvented via save web page complete
img src="file:///etc/passwd" is saved in the saved directory and then
easily accessed from js because it is in known subdirectory.
Reporter | ||
Comment 1•17 years ago
|
||
branch is affected, but it is directly broken locally.
Updated•17 years ago
|
Assignee: nobody → dveditz
Component: Download Manager → Security
Product: Firefox → Core
QA Contact: download.manager → toolkit
Assignee | ||
Comment 2•17 years ago
|
||
<img src="file:///foo"> should be a broken image, we shouldn't be making copies of things we don't let you link to in the first place!
Whiteboard: [sg:moderate]
Reporter | ||
Comment 3•17 years ago
|
||
it is a broken image.
something makes a local copy of a local file in known subdirectory.
javascript: uris don't seem to work at first sight.
Reporter | ||
Comment 4•17 years ago
|
||
css hides the broken image and the iframe's:
<img id="im1" src="file:///etc/passwd" style='visibility: hidden' />
Reporter | ||
Comment 5•17 years ago
|
||
note that this works for any accessible web resources, not just files.
Reporter | ||
Comment 6•17 years ago
|
||
another exploit vector via file in same directory:
main page
<iframe src="http://secret/secret.html">
<iframe src="/exploit.html">
save complete main page.
in page_files:
./exploit.html
./secret.html
exploit can easily read secret if allowed to read files in same directory.
Comment 7•17 years ago
|
||
Related to bug 332676?
Reporter | ||
Comment 8•17 years ago
|
||
(In reply to comment #7)
> Related to bug 332676?
>
yes, the intranet stuff seems the same.
Assignee | ||
Updated•17 years ago
|
Flags: blocking1.9?
Dan: Not sure what to do about this one as far as blocking goes? Is there anything we can really do here?
Dan, need your input here.
Comment 11•17 years ago
|
||
I don't think we can block on this, especially if it's something we've already shipped.
Flags: blocking1.9? → blocking1.9-
Updated•13 years ago
|
Keywords: sec-moderate
I believe that we should move to the same model as Chrome is using. I.e. each file loaded through file:// is considered a separate origin.
This will however screw website development quite a bit. So we should enable configuring directories where everything inside of such a configured directory is considered same-origin.
So a developer can set up /users/sicking/projects/mywebsite as being a website, which means that all files under that directory is same-origin with all other files in that directory.
We could even allow configuring that all files in that directory is same-origin with a particular http(s) website. That would likely even further help developers.
I don't know if we have a bug in place for anything like that. But it's something that I'd love to see built, both for security purposes, and because it'd be an awesome developer feature.
Assignee | ||
Comment 14•12 years ago
|
||
(In reply to Sid Stamm [:geekboy or :sstamm] from comment #12)
> Dan, is this something we should fix?
It's not the highest priority, but saving files locally is still a fairly common activity so yes, I don't think we should wontfix this bug. Maybe we should un-hide it and make it a mentored bug.
Flags: needinfo?(dveditz)
Updated•9 years ago
|
Group: core-security → dom-core-security
Comment 15•6 years ago
|
||
(In reply to Daniel Veditz [:dveditz] from comment #2)
<img src="file:///foo"> should be a broken image, we shouldn't be making
copies of things we don't let you link to in the first place!
This is now fixed as a result of bug 1469916.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Updated•5 years ago
|
Group: dom-core-security
Assignee | ||
Comment 16•2 years ago
|
||
but really bug 1500453 was the important bit here. Since we know what resolved this we should call it fixed rather than worksforme
Depends on: CVE-2018-12402, 1500453
Resolution: WORKSFORME → FIXED
Assignee | ||
Comment 17•2 years ago
|
||
Or really this is basically bug 332676
Resolution: FIXED → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•