Tracking flags configuration is vulnerable to CSRF and causes persistent XSS
Originally disclosed on Mozilla
- Fixed in 7 days
- Paid in 13 days
- Disclosed after 7 days
Tracking flags configuration has no CSRF protection currently meaning that anybody who successfully lures a Bugzilla admin to a malicious page can add or change tracking flags. For example, a malicious page could contain the following code:
> <img src="https://bugzilla-dev.allizom.org/page.cgi?id=tracking_flags_admin_edit.html&mode=new&values=[{%22comment%22%3A%22%22%2C%22is_active%22%3Atrue%2C%22setter_group_id%22%3A%221%22%2C%22value%22%3A%22---%22%2C%22id%22%3A0}]&visibility=[{%22component%22%3A%22%22%2C%22product%22%3A%22Firefox%22%2C%22id%22%3A0}]&save=1&flag_name=cf_foobar%3C/script%3E%3Cscript%3Ealert%28/xss/%29%3C/script%3E&flag_desc=foobar&flag_type=project&flag_sort=0&flag_enter_bug=1&flag_active=1">
Not only will this create a new tracking flag, anybody visiting a Firefox bug after that will see a message saying "xss" - the tracking flags data is being inserted into a script as JSON, without further validation. So one can add XSS payload to the flag ID and turn this into persistent XSS (there is client-side validation for flag ID but almost nothing on the server side).
Interesting fact: setting flag ID to something like "cf_foo::bar" will cause an error message whenever a bug is saved because the following line will try calling method bar via package cf_foo:
> my $new_value = $bug->$flag_name;
(extensions/TrackingFlags/Extension.pm line 650)
From what I can tell, this is not exploitable because there are no packages with names starting with cf_.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is known
A high-severity CSRF bug in Extensions. Mozilla made it public on 8 March 2016.
About CSRF
Another site makes a signed-in user's browser perform an action they did not intend.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.