New issue
Advanced search Search tips

Issue 794321 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug-Security



Sign in to add a comment

Websites and HTML files can see files on the user's computer by iframing to a location on the filesystem

Reported by 93m4qau...@gmail.com, Dec 12 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
1. Open the attached HTML file in Chrome

What is the expected behavior?
Even though the Chrome browser allows you to browse directories on the local file system under file:///, websites and HTML files should not be allowed to see files on the user's computer by iframing to a place on the filesystem.

What went wrong?
Websites and HTML files can allowed to see files on the user's computer by iframing to a place on the filesystem. The HTML document could specify to have the iframe cosmetically hidden, but still there, from which the website could see it.

Did this work before? N/A 

Chrome version: 63.0.3239.84  Channel: stable
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

I'm not requesting that Chrome discontinue its directory browsing feature under file:///, but rather that iframes are not allowed to file:///.
 
HTML iframe to filesystem.html
117 bytes View Download

Comment 1 by cthomp@chromium.org, Dec 13 2017

Thanks for your report.

file:// URLs should be treated as unique origins (per  crbug.com/455882 ), which should prevent the parent frame from being able to read anything in the child frame, even if it appears as a subframe when the page is rendered.

I was able to view the iframe with the directory listings, but was able to verify that I could not access any of its information via JavaScript in the parent frame, which was correctly blocked as cross-origin.

To clarify: were you able to have the parent frame access the filesystem details directly?

Otherwise, I think this is working as intended.

Comment 2 by cthomp@chromium.org, Dec 13 2017

Cc: cthomp@chromium.org
Components: UI>Browser>Navigation Blink>SecurityFeature>SameOriginPolicy
Beyond what's noted in #1, file:// URIs should only be framable by other file:// uris. It should not be possible to iframe a file:// URI from a page served by a web protocol like HTTP or HTTPS.
Unfortunately, I don't have access to a server, so I couldn't test this out over the web, only when loading the file locally. Are you saying that websites (unlike locally loaded HTML files) won't be able to see file:/// directories like this, or is more investigation required?

Comment 5 by nasko@chromium.org, Dec 13 2017

You can use https://web.evilbit.io/frame_file_url.html to test and see that the DevTools console says: Not allowed to load local resource: file:///etc/passwd.

Comment 6 by cthomp@chromium.org, Dec 13 2017

I verified #3 -- it will only be frame-able for other pages loaded over file:// URLs.

The page framing the file:// URL would not be able to see the contents either way because of the same-origin policy (to the parent page, it would essentially be inaccessible). For example, the parent page would not be able to access any details about the files, despite it rendering within the frame on the page.
Thank you for checking on that. You can close this issue then.

Comment 8 by cthomp@chromium.org, Dec 14 2017

Status: WontFix (was: Unconfirmed)
Project Member

Comment 9 by sheriffbot@chromium.org, Mar 22 2018

Labels: -Restrict-View-SecurityTeam allpublic
This bug has been closed for more than 14 weeks. Removing security view restrictions.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Sign in to add a comment