New issue
Advanced search Search tips

Issue 617970 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: ----
Type: Bug-Security



Sign in to add a comment

Security: window.open dereferences an incomplete DOM to the caller

Reported by d...@whiteops.com, Jun 7 2016

Issue description

This template is ONLY for reporting security bugs. If you are reporting a
Download Protection Bypass bug, please use the "Security - Download
Protection" template. For all other reports, please use a different
template.

Please see the following link for instructions on filing security bugs:
http://www.chromium.org/Home/chromium-security/reporting-security-bugs


VULNERABILITY DETAILS

An incomplete window object is returned to a caller during window.open.  For example, window.open("https://gmail.com").document will return the document of an about:blank (which does not yet violate SOP).  This is a fertile ground for universal XSS, with lots of objects that are not yet fully initialized (performance, console, screen, etc.).

Does not appear to work on iframes, or even already open windows, this is purely on new tab creation.  Does require poup blocker bypass but that's not a security technology.

VERSION
Probably all.

REPRODUCTION CASE
Fairly self-evident.  I could keep poking at this until I find the concrete exploit, but I've got a handle I really shouldn't.

FIX
Don't just move the SOP check up, make sure whatever DOM is returned to the caller is sufficiently initialized.
 

Comment 1 by d...@whiteops.com, Jun 7 2016

Actually, I'm not sure the "incomplete DOM" is any different than a straight window.open("about:blank").  Still, pretty squicked.
Please upload a proof of concept.  Thanks.

Comment 3 by d...@whiteops.com, Jun 9 2016

Compare the output of:

window.open("about:blank").screen

to

x = window.open("about:blank")
x.screen

That is not a fully initialized object I'm getting back in the former case.  There's just this whole universe of reads and writes with results nobody can assert the characteristics of.

I admit I'm warning you guys a little early.  If you'd prefer to wait for something a little more concrete, I won't be offended, and I'll work to satisfy your request.  My style is to provide warnings without delay.
Cc: a...@chromium.org
I can't repro this in the console -- the results of the two look the same.

avi -- Is the wai?

Comment 5 by d...@whiteops.com, Jun 9 2016

You'll get identical output if you don't allow popups.  Popup blocker isn't considered a security barrier generally, but not sure Chrome policy here.  Attaching screenshot of different output when popup is allowed to occur.


uninit.png
67.9 KB View Download

Comment 6 by a...@chromium.org, Jun 9 2016

I don't know if the uninitialized DOM part is WAI. I'm not really a security details type, so I can't comment to that.

Comment 7 by d...@whiteops.com, Jun 9 2016

WAI?  Curious about this term.

There's a pile of history (in multiple browsers) around this sort of issue, where there's an explosion of available states at small timescales.

Comment 8 by a...@chromium.org, Jun 9 2016

WAI = Working As Intended.

I have no clue as to whether this is an issue or not; it's well out of what I know.

Comment 9 by d...@whiteops.com, Jun 9 2016

May be Windows only.

Comment 10 by d...@whiteops.com, Jun 9 2016

window.open("https://gmail.com").document.location.href
"about:blank"

Presumably that is not WAI.

Comment 11 by a...@chromium.org, Jun 9 2016

Why not?

window.open() starts loading, but until the load commits the document DOM object is still the old blank one.

Comment 12 by d...@whiteops.com, Jun 9 2016

A substantially different object is returned on Linux vs. Windows.  Which one is WAI?

Comment 13 by a...@chromium.org, Jun 9 2016

As far as I know, the line "window.open("https://gmail.com").document.location.href" is a race. You're racing the load of gmail. Both outcomes seem reasonable to me.

Comment 14 by d...@whiteops.com, Jun 9 2016

I'm not concerned about about:blank as much as I am by the incomplete object.  You think an object state that exists for milliseconds has had any security coverage?

I'm not just beating the nav to gmail, I'm beating the proper initialization of the window object.

Anyway, this is a debate best resolved by fuzzing :)

Comment 15 by a...@chromium.org, Jun 9 2016

What do you mean by "incomplete", though?

If you get something completely different than the object from a normal "about:blank" load, I'd be worried. If it's just the fact that it's "about:blank", I'd not be worried.

Continue fuzzing away, though. That's always enlightening.

Comment 16 by d...@whiteops.com, Jun 9 2016

I mean uninitialized.  I don't know other things that make navigator not have a user agent, performance come back all 0's, console be missing methods...

There's just lots of history at this attack point.

uninit2.png
126 KB View Download

Comment 17 by a...@chromium.org, Jun 9 2016

OK, yeah, that's probably concerning, and over my head.

Comment 18 by d...@whiteops.com, Jun 9 2016

Possibly different, as closed windows have their own quirks, but:

(w = window.open("about:blank")).close()

Cc: jochen@chromium.org
Components: Blink>JavaScript
Labels: Security_Impact-Head
eisinger -- Can you suggest an owner, and comment on if this is a known issue (or an issue at all)?  Thanks
Status: WontFix (was: Unconfirmed)
this is work as intended. The document is not partially initialized, it's a fully initialized about:blank document. When the new window then navigates to the initial URL, the document is replaced with the one for that url.

Comment 21 by d...@whiteops.com, Jun 13 2016

Alright, will report back if fuzzing yields.
Project Member

Comment 22 by sheriffbot@chromium.org, Sep 16 2016

Labels: -Restrict-View-SecurityTeam
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 23 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 24 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