Bug in asynchronous calls that allows calling javascript after a window.open call
Reported by
neutrino...@gmail.com,
Jul 19
|
||||
Issue descriptionThis 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: https://www.chromium.org/Home/chromium-security/reporting-security-bugs NOTE: Security bugs are normally made public once a fix has been widely deployed. VULNERABILITY DETAILS This vulnerability allows a javascript call to be made after window.open is called VERSION Chrome Version: Google Chrome 66.0.3359.117 stable Operating System: Kali linux, 2018.1, 4.14.0-kali3-amd64 REPRODUCTION CASE Unpack the attached zip file and load index.html, most preferably from a local server due to a "window.location.pathname" being set (NOTE: I am using 16GB of ram and Computing power is important in this vulnerability) And i would also like to add that in the hands of an attacker that can corrupt memory, javascript can be placed in the redirected website. Also this attack has an 80% success rate on my laptop. Sometimes the intended website is loaded but most times the page is redirected This is my first ever bug report and i would appreciate it if you treat me as the novice that i am and give me the opportunity to explain more about this. Thanks for the attention!!!.
,
Jul 19
I replied via email but I am not sure if that was the right channel for that so this is a follow up. In line 33 of index.html there is a call to window.open to redirect to site2.html if a certain value is set to true which it will be set to after 4000ms The expected behavior is for the browser to open site two but asynchronous calls made during that time override this behavior and redirects you to another.html with the text "Wait a minute... You are not supposed to be here". The redirection to another.html only occurs after the window.open is called and so redirecting to my specified page is definitely not wanted in this case
,
Jul 19
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jul 19
Thanks for the additional details. I've been able to reproduce the behavior you described on Chrome 69 on Linux (where the navigations occur in that order). This falls under one of the exceptions to the same-origin policy when you have a handle to the Window object (https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Window) -- read/write access to window.location is allowed. Typically this behavior would be for popups, but there may be a brief time when the prior javascript execution context can finish executing deferred tasks after another navigation is committing. I don't think there are any security consequences here, since you could explicitly do the same thing without the timing race by opening site2.html in a popup, and that would fully fall under the exception allowed under the same-origin policy. (Additionally, with site-isolation, cross-site navigations like this are forced into separate processes, so even if the old javascript execution context is still running it can't use this trick to load a different site into its process.) This is, however, a potentially confusing behavior that could occur with kinda-buggy asynchronous javascript navigations on sites in the wild, so I'll leave this as a functional bug that the V8 team can consider. If you come up with other tricks you can pull off, please file a new security bug and one of us would be happy to take a look :-)
,
Jul 19
The review process made it a nice first bug reporting experience for me. Thank you for making it pleasant for a tech enthusiast still months shy of 18. I am hopeful that I have been able to at least add value to the project as I look forward to helping out whenever possible, to make technology better in the service of humanity. Sorry about going philosophical, Sometimes i just get in the mood :)
,
Jul 20
Good morning, sorry to disturb but i changed the url in the open call to "http://www.google.com" and i still got the same results, hoping you could confirm this at your end
,
Jul 20
Yep, I would expect that this can still work even when the window opened is to a different origin. Read/write access to window.location is allowed as an exception to the same-origin policy if you have access to the window object. Happy bug hunting :-)
,
Jul 31
|
||||
►
Sign in to add a comment |
||||
Comment 1 by cthomp@chromium.org
, Jul 19