New issue
Advanced search Search tips

Issue 676921 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug-Security



Sign in to add a comment

Security: XSS in https://chromium-cq-status.appspot.com

Reported by rskans...@gmail.com, Dec 24 2016

Issue description

Hi, 

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`



 
Components: Infra
Status: Untriaged (was: Unconfirmed)

Comment 2 by rskans...@gmail.com, 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

Comment 3 by kenrb@chromium.org, Dec 28 2016

Components: -Infra Infra>CQ
Labels: Security_Severity-Medium Security_Impact-Stable OS-All Pri-1
Owner: tandrii@chromium.org
Status: Assigned (was: Untriaged)
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.
Cc: sergeybe...@chromium.org kenrb@chromium.org alancutter@chromium.org
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?
Project Member

Comment 5 by sheriffbot@chromium.org, Dec 29 2016

Labels: M-56
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.
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.
Labels: -Security_Severity-Medium Security_Severity-Low
Thanks. I am downgrading the severity on the basis of that origin being a low value target for XSS.
Cc: estaab@chromium.org
Cc: dpranke@chromium.org vadimsh@chromium.org d...@chromium.org
For all cc-ed, it'd be great if you review my CL and suggests improvements OR maybe even upload a better CL.
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
Project Member

Comment 15 by sheriffbot@chromium.org, Jan 4 2017

Labels: -Pri-1 Pri-2
You are right. Updated patch.
Status: Fixed (was: Assigned)
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.
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? 
Cc: tandrii@chromium.org
Owner: kenrb@chromium.org
Status: Assigned (was: Fixed)
It's for kenrb@ to decide.
Status: Fixed (was: Assigned)
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.
Thanks for the report and the fix. (:
Project Member

Comment 23 by sheriffbot@chromium.org, Jan 5 2017

Labels: -Restrict-View-SecurityTeam Restrict-View-SecurityNotify

Comment 24 Deleted

Labels: -Release-0-M56
Project Member

Comment 26 by sheriffbot@chromium.org, Apr 13 2017

Labels: -Restrict-View-SecurityNotify allpublic
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