New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 809062 link

Starred by 3 users

Issue metadata

Status: Duplicate
Merged: issue 696446
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac , Fuchsia
Pri: 1
Type: Bug-Security

Blocked on:
issue 811558



Sign in to add a comment

Security: URL spoof using filesystem URI with embedded HTTP URI containing userinfo

Reported by greencar...@hotmail.com, Feb 5 2018

Issue description

VULNERABILITY DETAILS
Within filesystem uri scheme we can attempt to pass a username and password and the url still works except the username and password passed do not disappear as they do normally. If we pass a long enough user:pass we can make it look like the url is from google.com

Using "filesystem:http://localhost/temporary/example.html" we navigate to
"filesystem:http://google.com:80@localhost/temporary/example.html" 
the document will render and the url is unchanged.

VERSION
Chrome Version: Version 63.0.3239.132 (Official Build) (64-bit)
Operating System: Windows 10 x64

REPRODUCTION CASE
PoC attached. Simply host it and visit it.

 
q.html
996 bytes View Download
Cc: mea...@chromium.org
Components: UI>Security>UrlFormatting
Labels: Security_Impact-Stable
Summary: Security: URL spoof using filesystem URI with embedded HTTP URI containing userinfo (was: Security: URL spoof using filesystem URI scheme)
Interesting, thanks for the report. We do indeed strip userinfo for security display in HTTP URLs, and this does bypass that protection. 

We are currently considering changing the display of Filesystem URIs for display, and should also resolve this issue.


UserInfoNotStripped.png
15.0 KB View Download
Components: UI>Browser>Omnibox
Status: Untriaged (was: Unconfirmed)
If we choose to mitigate this directly, I think we need to adjust 

components/url_formatter/url_formatter.cc's  FormatUrlWithAdjustments such that if (format_types & kFormatUrlOmitUsernamePassword && url.SchemeIsFileSystem()) we also strip out the userinfo embedded in the inner URL.

Having said that, I think we're leaning toward forbidding userinfo in HTTP(S) URIs entirely (as some other browsers do) and I suspect that we could ban construction of filesystem URIs with embedded HTTP userinfo with no real-world compatibility impact.
Also related: Bug 714339


Cc: carlosil@chromium.org elawrence@chromium.org est...@chromium.org
Labels: Security_Severity-High M-65 Team-Security-UX Pri-1
Status: Available (was: Untriaged)
Can an Enamel person make sure what platforms this happens on, and also assign the bug to themselves? :)

This would seem to be a High, per the severity guidelines. https://chromium.googlesource.com/chromium/src/+/master/docs/security/severity-guidelines.md "Complete control over the apparent origin in the omnibox", depending on how liberally we interpret that. (I.e. do we reasonably expect people to notice that the apparent origin is light gray text. I'd think no, hence High.) If I'm wrong, please feel free to change it.
Blockedon: 714339
Owner: mea...@chromium.org
Status: Assigned (was: Available)
Assigning to Mustafa, since he already owns bug 714339.
Labels: OS-Android OS-Chrome OS-Fuchsia OS-Linux OS-Mac OS-Windows
OS-All sounds about right, filesystem scheme shouldn't be OS specific.

palmer: I'd argue this is different from the example given in the severity guidelines ( bug 76666 ). Even an attentive user wouldn't be able to tell the difference with that bug, whereas this one requires them to not notice that the whole URL is grayed out and that there is a "Not Secure" warning.

I agree with #7 that this seems like a Medium at worst, but I will note that you can suppress the explicit "Not Secure" warning by running your attack from a HTTPS URI.
Cc: jsb...@chromium.org rbyers@chromium.org
+rbyers,jsbell for bug visibility
Labels: -Security_Severity-High Security_Severity-Medium
Dropping severity per #7 and #8.

As a fix, we are considering blocking content-initiated top-frame navigations to filesystem URLs.
Blockedon: -714339 811558
Status: Started (was: Assigned)

Comment 12 by nick@chromium.org, Mar 29 2018

I have a pending CL that will strip userinfo from filesystem: URLs at the GURL level (during canonicalization): https://chromium-review.googlesource.com/c/chromium/src/+/974380
Project Member

Comment 13 by bugdroid1@chromium.org, Apr 4 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ff69a10a306f029b25759e78e0c3cc98a3fa840c

commit ff69a10a306f029b25759e78e0c3cc98a3fa840c
Author: Nick Carter <nick@chromium.org>
Date: Wed Apr 04 00:15:17 2018

[GURL] (2 of 2) Strip username/password/port when canonicalizing, if the scheme doesn't support them

The goal of this CL is to inhibit port numbers and usernames in internal schemes
like "chrome-extension" and "chrome". Currently, navigations to chrome-extension:// URLs
with ports actually get suprisingly far; it seems like no good can possibly come from
that.

A new SchemeType is added: SCHEME_WITH_HOST_AND_PORT (no user information).
This is only used when canonicalizing the inner URL of filesystem: -- e.g.,
filesystem:http://user@host:20/temp/foo now canonicalizes to
filesystem:http://host:20/temp/foo; whereas filesystem:chrome://user@host:20/temp/foo
canonicalizes to filesystem:chrome://host/temp/foo

Bug: 606001, 809062 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I77c5ba3d2fe964deb8aadae95a06519ce038c472
Reviewed-on: https://chromium-review.googlesource.com/974380
Reviewed-by: Vasilii Sukhanov <vasilii@chromium.org>
Reviewed-by: Tommy Li <tommycli@chromium.org>
Reviewed-by: Mike West <mkwst@chromium.org>
Commit-Queue: Nick Carter <nick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#547882}
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/components/password_manager/core/browser/android_affiliation/affiliation_utils.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/components/url_formatter/url_fixer_unittest.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/gurl_unittest.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/scheme_host_port.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/url_canon.h
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/url_canon_filesystemurl.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/url_canon_relative.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/url_canon_stdurl.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/url_canon_unittest.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/url_util.cc
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/url_util.h
[modify] https://crrev.com/ff69a10a306f029b25759e78e0c3cc98a3fa840c/url/url_util_unittest.cc

Comment 14 by nick@chromium.org, Apr 4 2018

I believe that r547882 effectively fixes this issue. As it's an invasive change to GURL canonicalization, it's probably not a great merge candidate given the M66 timeline, but let me know if a solution in M66 is important.

Comment 15 by nick@chromium.org, Apr 4 2018

Cc: nick@chromium.org
Project Member

Comment 16 by sheriffbot@chromium.org, Apr 18 2018

Labels: -M-65 M-66
I believe this is duplicate of  Issue 696446 .
Mergedinto: 696446
Status: Duplicate (was: Started)
Yes, this is a duplicate. Merging into  Issue 696446  and also dropping view restrictions since the other bug has been open for over a year.
Labels: -Restrict-View-SecurityTeam allpublic

Sign in to add a comment