View Issue Details

IDProjectCategoryView StatusLast Update
0026078mantisbtsecuritypublic2020-12-30 08:26
Reporteratrol Assigned Toatrol  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Target Version2.21.3Fixed in Version2.21.3 
Summary0026078: CVE-2019-15539: Stored XSS on Project Documentation
Description

Vulnerability in deprecated project documentation functionality ($g_enable_project_documentation).

This allows execution of arbitrary code (if CSP settings permit it) after uploading an attachment with a crafted filename.

Steps To Reproduce
  • set $g_enable_project_documentation = ON;
  • upload a document with crafted filename
  • edit the document using proj_doc_edit_page.php
TagsNo tags attached.
Attached Files
proj_doc_xss.patch (1,122 bytes)   
From 14e58c1cadaf2ebed476f55626408443d408436d Mon Sep 17 00:00:00 2001
From: Roland Becker <roland@atrol.de>
Date: Sun, 25 Aug 2019 11:52:41 +0200
Subject: [PATCH] Fix XSS on project documentation

Vulnerability in deprecated project documentation functionality
($g_enable_project_documentation), allowing execution of arbitrary
code (if CSP settings permit it) after uploading an attachment with a
crafted filename.

Prevent the attack by sanitizing the filename before display.

Fixes #26078
---
 proj_doc_edit_page.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/proj_doc_edit_page.php b/proj_doc_edit_page.php
index 5367ad8bd..f9008d180 100644
--- a/proj_doc_edit_page.php
+++ b/proj_doc_edit_page.php
@@ -125,7 +125,7 @@ print_doc_menu();
 			$t_href = '<a href="file_download.php?file_id='.$v_id.'&amp;type=doc">';
 			echo $t_href;
 			print_file_icon( $v_filename );
-			echo '</a>&#160;' . $t_href . file_get_display_name( $v_filename ) . '</a>';
+			echo '</a>&#160;' . $t_href . string_html_specialchars( file_get_display_name( $v_filename ) ) . '</a>';
 		?>
 	</td>
 </tr>
-- 
2.23.0

proj_doc_xss.patch (1,122 bytes)   

Relationships

related to 0025995 closeddregad CVE-2019-15074: Stored XSS Vulnerability in Timeline 
has duplicate 0026079 closedatrol CVE-2019-15539: Stored XSS on Project Documentation 

Activities

dregad

dregad

2019-08-25 07:25

developer   ~0062648

Last edited: 2019-08-25 11:51

CVE request 746787 sent.

Even though this is a deprecated feature and the vulnerability is not widely accessible (need ability to manage project documentation) I'll aply the patch on all branches.

dregad

dregad

2019-08-26 03:03

developer   ~0062661

CVE-2019-15539 assigned

Related Changesets

MantisBT: master-2.21 bd094ded

2019-08-25 01:52

atrol

Committer: dregad


Details Diff
Fix XSS on project documentation

Vulnerability in deprecated project documentation functionality
($g_enable_project_documentation), allowing execution of arbitrary
code (if CSP settings permit it) after uploading an attachment with a
crafted filename.

Prevent the attack by sanitizing the filename before display.

Fixes 0026078
Affected Issues
0026078
mod - proj_doc_edit_page.php Diff File

MantisBT: master-1.3.x 796a327f

2019-08-25 01:52

atrol

Committer: dregad


Details Diff
Fix XSS on project documentation

Vulnerability in deprecated project documentation functionality
($g_enable_project_documentation), allowing execution of arbitrary
code (if CSP settings permit it) after uploading an attachment with a
crafted filename.

Prevent the attack by sanitizing the filename before display.

Fixes 0026079 (clone of issue 0026078)

(cherry picked from commit bd094dede74ff6e313e286e949e2387233a96eea)
Affected Issues
0026078, 0026079
mod - proj_doc_edit_page.php Diff File