From 7df30a9ee703f4d48e6ef8df078cff3a6029c5b9 Mon Sep 17 00:00:00 2001 From: David Hicks Date: Sat, 19 Jan 2013 09:49:13 +1100 Subject: [PATCH] Fix #15384: summary.php XSS vulnerability in MantisBT 1.2.12 only Roland Becker (MantisBT Developer) discovered a XSS vulnerability introduced in MantisBT 1.2.12 with the display of category/project names on the summary.php page. A malicious MantisBT user holding privileged manager/administrator permissions could create a category or project name that contains JavaScript code. Any user visiting summary.php from that point on may then be exposed to having the malicious JavaScript execute within their browser environment. The severity of this issue is limited by the need to hold privileged manager/administrator permissions in order to modify category and project names. However -- there are many use cases where MantisBT installations can have hundreds of sub-projects, each managed by different people/parties that can not or should not be fully trusted. Refer to previous commits 3ca8a164 and 6ec3f693 to trace back the origin of this vulnerability. --- core/summary_api.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/summary_api.php b/core/summary_api.php index abdbbc4..33615b1 100644 --- a/core/summary_api.php +++ b/core/summary_api.php @@ -626,9 +626,9 @@ function summary_print_by_category() { $v_category_name = $row['category_name']; if(( $v_category_name != $last_category_name ) && ( $last_category_name != -1 ) ) { - $label = $last_category_name; + $label = string_display_line( $last_category_name ); if(( ON == $t_summary_category_include_project ) && ( ALL_PROJECTS == $t_project_id ) ) { - $label = sprintf( '[%s] %s', project_get_name( $last_project ), $label ); + $label = sprintf( '[%s] %s', string_display_line( project_get_name( $last_project ) ), $label ); } $t_bug_link = ' 0, 'resolved' => 0, 'closed' => 0 ); -- 1.8.1.1