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

Issue 594383 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug-Security



Sign in to add a comment

Security: UXSS via window.open() via file:// pages

Reported by chromium...@gmail.com, Mar 13 2016

Issue description

VERSION
Chrome Version: 51.0.2675.0 canary
Operating System: windows 7

Actually I'm not sure about if this's a security issue because I can repro this just when I use the testcase from local (file:///) and when I try it from server ('http://') doesn't repro.

Please watch the video for the steps (steps.mp4)
 
steps.mp4
215 KB Download
testcase.html
244 bytes View Download
Cc: creis@chromium.org
Status: WontFix (was: Unconfirmed)
This is just an alert box sticking on the screen due to navigation, but there is no cross origin data theft or leak of data. This is not an XSS since there is no script execution in that target window. Closing.
Thanks - But I can make an alert box executing in the target window "google.com" as in the attached image results.png
result.png
62.5 KB View Download
Alert box is not useful, there is no user input that you can steal here.

Comment 4 by creis@chromium.org, Mar 15 2016

Owner: dcheng@chromium.org
Status: Assigned (was: WontFix)
Summary: Security: UXSS via window.open() via file:// pages (was: Security: XSS via window.open() )
I can repro this, and it's definitely bad behavior.  Two dialogs are shown: one before the victim URL commits (showing blank), and one after, as shown in the screenshot.  The second dialog runs in the context of the new page, and it has access to the page (document.domain, document.cookie, etc).  That's a UXSS.

I'm not sure why it would be specific to file:// URLs, which is indeed a mitigating factor.  It also doesn't repro on M50, so it's probably a recent change.

@dcheng: Can you take a look?  I wonder if it's related to any of the UXSS fixes you've been doing.

Comment 5 by dcheng@chromium.org, Mar 15 2016

I took a quick look… and universal access is true?!

Comment 6 by dcheng@chromium.org, Mar 15 2016

OK, the problem is allowUniversalAccessFromFileURLs defaults to true in Blink.

In RenderViewImpl::Initialize , we create a new main frame (and its associated Document). At this point, Document::initSecurityContext sees that allowUniversalAccessFromFileURLs = true and grants universal access to the origin!

Of course, a few lines later in RenderViewImpl::Initialize, we apply the preferences [1], but it's already too late.

[1] https://code.google.com/p/chromium/codesearch#chromium/src/content/renderer/render_view_impl.cc&rcl=1457998259&l=743
Labels: Security_Severity-Medium Security_Impact-Head Pri-1
Thanks Charlie and Daniel for correctly triaging this.

Assigning it medium severity based on the need of file:// url, still looks bad.
Labels: M-51
Components: UI>Browser>Navigation
Components: UI>Browser>Navigation
Labels: Security_Severity-Medium M-51 Security_Impact-Head Pri-1
OK, I have a preliminary fix prepared that changes it so we apply WebSettings as soon as possible: https://codereview.chromium.org/1799423003

I /think/ this should be safe (it doesn't crash locally), but it's somewhat of a large change.

I see two other possibilities for fixing it that would result in smaller but suboptimal patches.
- Default allowUniversalAccessFromFileURLs to false: this might break Android WebView (which I think depends on this setting) in the reverse way if a Document with file:// origin opens a new window.
- Just apply WebSettings related to security before creating the main frame. Kind of ugly, because it splits up the settings initializations into a special case.
Project Member

Comment 11 by ClusterFuzz, Mar 15 2016

Labels: ReleaseBlock-Beta
This medium+ severity security issue is a regression on trunk.

Please fix this asap. If you are unable to look into this soon, please revert your change.

- Your friendly ClusterFuzz
I can report this bug more easily without the first alert dialog:

<button onclick="fsBypass();">click Here</button>
<script>
function fsBypass() {
  var x = window.open("https://abc.xyz");
  setTimeout(function(){x.location = "javascript:alert(document.domain)";}, 1000)
}
</script>

testcase.html
224 bytes View Download
Status: Fixed (was: Started)
Project Member

Comment 15 by ClusterFuzz, Mar 15 2016

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify Merge-NA

Comment 16 Deleted

Labels: reward-topanel

Comment 18 Deleted

Any update on the reward?
Cc: timwillis@chromium.org
+Tim from security :)
Not yet - we're still working through a panel backlog. You should hear back in a few weeks.
Project Member

Comment 22 by sheriffbot@chromium.org, Jun 22 2016

Labels: -Restrict-View-SecurityNotify
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
Labels: -reward-topanel reward-3000 reward-unpaid
OK - now we're through the reward panel backlog. Thanks for your patience.

$3,000 for this report - congrats! We'll add this to the next payment run.
Labels: -reward-unpaid reward-inprocess
Project Member

Comment 25 by sheriffbot@chromium.org, Oct 1 2016

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
Project Member

Comment 26 by sheriffbot@chromium.org, Oct 2 2016

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
Labels: allpublic

Sign in to add a comment