Issue metadata
Sign in to add a comment
|
Security: Possible to bypass the JavaScript Scheme Paste protection
Reported by
isaacpor...@gmail.com,
Sep 17 2017
|
||||||||||||||||||||||
Issue descriptionVULNERABILITY DETAILS Through social engineering, one can once again convince users to paste JavaScript URIs into the address bar by including special characters to bypass the javascript: prefix detection, but are ignored by the actual URL engine. You can even go a step further by potentially having it mask that fact if the user doesn't read the entire omnibox (as demonstrated in the attachment, although some users can likely be goaded into not requiring this, eg when it was a rather major issue in the past.) VERSION Chrome Version: 53.0.2785.80 Stable Operating System: Windows 10 Professional
,
Sep 18 2017
Looking closer, the fix probably needs to be in OmniboxView::StripJavascriptSchemas just above, as that function is used for equivalent threats, like dragging URLs.
,
Sep 18 2017
Yeah, my network has been very sporatic so it's been a pain to update, but I recently finally got a less.. significantly out of date version. This issue also occurs in Firefox apparently, I'll be reporting it to them soon as well.
,
Sep 18 2017
I'm looking around, where would the final sanitization function be? Why not just use that, as opposed to SanitizeTextForPaste, because it seems to do the same thing and more.
,
Sep 18 2017
Alright, I THINK that the finalized URL is a result of https://cs.chromium.org/chromium/src/components/omnibox/browser/autocomplete_input.cc?l=151 -- and it uses TrimWhitespace (which curiously, the omnibox isn't using, so it might be worth having the omnibox use string_util's TrimWhitespace.) However: It should be failing in the first place (https://cs.chromium.org/chromium/src/components/url_formatter/url_fixer.cc?l=369) -- it returns false if there's a control character in the string. So it seems the issue is happening somewhere else, possibly outside of the URL formatter component entirely.
,
Sep 18 2017
Re #5-- Yes, performing the same cleanup between the two areas is important; the Omnibox code is quite complex. Your bug reproduces in Firefox 57. Would you like to file a parallel security bug in their bug tracker?
,
Sep 18 2017
Yeah, that'd be ideal, I was intending to report it there later when I got a little more free time today.
,
Sep 18 2017
Ugh. This was actually reported in Issue 631847 , which has been public since June.
,
Sep 18 2017
Uh oh, dang. I didn't even find that -- but I havent' found a similar bug in Firefox's Bugzilla so it's probably still worth reporting there. However, that's kinda awry if it's been an issue that long. I guess the best way to resolve this for now is to skip any prefixed characters with an ascii value of less than 32 when evaluating if the javascript URI is still there. I don't see that it'd strip aggressively at all because there wouldn't be anything but control characters (which you wouldn't have to strip either) for the purposes of preventing of preventing the previously found issues with allowing javascript: pastables.
,
Sep 19 2017
Merging into bug 631847 per comments #9 and #10.
,
Sep 19 2017
I'm going to drop view restrictions since the duplicate bug has been open for a long time. If you object, please let me know.
,
Sep 19 2017
Go ahead; might encourage a more proper patch (I was going to write one but realized I don't have the resources to test it) with the added information this report includes.
,
Sep 19 2017
Thanks! |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by elawrence@chromium.org
, Sep 18 2017Status: Untriaged (was: Unconfirmed)