Issue metadata
Sign in to add a comment
|
Security: XSS in https://chromium-cq-status.appspot.com
Reported by
rskans...@gmail.com,
Dec 24 2016
|
||||||||||||||||||||||
Issue descriptionHi, I know that *.appspot is in most cases not a qualifying bug, but I thought as this domain is so closely coupled to chromium development, it should be disclosed to you. The url `https://chromium-cq-status.appspot.com/v2/patch-status/arg1/arg2/arg3 is vulnerable to XSS via. all args. There seems to be no real escaping of the user input. #POC `https://chromium-cq-status.appspot.com/v2/patch-status/x/42;alert(document.domain)/z`
,
Dec 25 2016
The ' in the end of the #POC url is mistake. it should be https://chromium-cq-status.appspot.com/v2/patch-status/x/42;alert(document.domain)/z
,
Dec 28 2016
tandrii@: Is this something that you can help sort out? I am guessing on the severity, setting it to Medium, because it is not obvious how dangerous this is.
,
Dec 28 2016
I don't know how bad this XSS is. All data inside the app and its domain is 100% public. But bad forged URLs can perhaps be used to exploit some chrome vulnerability using our "reputable" app? On the app itself: I'm not surprised. The code is effectively unmaintained and 99% untested. I don't yet know all the places where the code has to be fixed, but I'm very certain there are other bugs there. Sergey or Alan, do you think you can help with this since you are more familiar with the code than anybody else?
,
Dec 29 2016
,
Jan 3 2017
The problem is the use of cgi.escape(). https://cs.chromium.org/chromium/infra/appengine/chromium_cq_status/handlers/patch_status.py cgi.escape() sanitises against HTML injection but this is being inserted into Javascript. We should wrap these with int() and repr() for numbers and strings respectively.
,
Jan 3 2017
I don't repr is what we want. >>> print repr((1, '"', 2, 'a', 3, "'")) (1, '"', 2, 'a', 3, "'") Also, the variables are used in both JS and HTML.
,
Jan 3 2017
WDYT about this https://chromium-review.googlesource.com/422330?
,
Jan 3 2017
CL 422330 deployed as https://303cc7b-dot-chromium-cq-status.appspot.com/
,
Jan 3 2017
Thanks. I am downgrading the severity on the basis of that origin being a low value target for XSS.
,
Jan 3 2017
,
Jan 3 2017
,
Jan 3 2017
For all cc-ed, it'd be great if you review my CL and suggests improvements OR maybe even upload a better CL.
,
Jan 3 2017
Commented on the patch, we still need cgi.escape() when injecting into JS. Example: https://303cc7b-dot-chromium-cq-status.appspot.com/v2/patch-status/%3C/script%3EXSS%3Cscript%3E/1067633003/1
,
Jan 4 2017
,
Jan 4 2017
You are right. Updated patch.
,
Jan 4 2017
The following revision refers to this bug: https://chromium.googlesource.com/infra/infra.git/+/98ddcabed466021e7458196dba3ec89e8a604d6e commit 98ddcabed466021e7458196dba3ec89e8a604d6e Author: Andrii Shyshkalov <tandrii@chromium.org> Date: Wed Jan 04 14:36:37 2017 Improve patch_status of CQ status app. R=alancutter@chromium.org BUG= 676921 Change-Id: I802998a8c012f5f13e180e304e113e24b21dd0ce Reviewed-on: https://chromium-review.googlesource.com/422330 Reviewed-by: Sergey Berezin <sergeyberezin@chromium.org> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org> [modify] https://crrev.com/98ddcabed466021e7458196dba3ec89e8a604d6e/appengine/chromium_cq_status/handlers/patch_status.py [modify] https://crrev.com/98ddcabed466021e7458196dba3ec89e8a604d6e/appengine/chromium_cq_status/templates/patch_status.html
,
Jan 4 2017
Deployed as 98ddcabed version to both instances (incl. internal-cq-status) and highend + default services. Also, filed issue 678254 to actually deprecate & remove this app.
,
Jan 4 2017
Hey. thanks for the quick response and fix. Is this eligible for HoF or bug reward? Also there are a few other chromium related app spot applications, would it worth or okay if I take a look for vulns too?
,
Jan 4 2017
It's for kenrb@ to decide.
,
Jan 4 2017
It's not really up to me, there is a panel that makes vulnerability reward decisions. Unfortunately I don't think this will get picked up because it does not meet the program requirements, described here: https://www.google.com/about/appsecurity/chrome-rewards/index.html I'll send a note to the reward program manager to see if he wants to flag this for panel review, but low severity vulnerabilities are typically not considered.
,
Jan 4 2017
Thanks for the report and the fix. (:
,
Jan 5 2017
,
Jan 25 2017
,
Apr 13 2017
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 |
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by elawrence@chromium.org
, Dec 25 2016Status: Untriaged (was: Unconfirmed)