Security issue: File / folder name not being escaped correctly in filebrowser

Bug #1888163 reported by Robert Lyon
256
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
19.04
Fix Released
High
Unassigned
19.10
Fix Released
High
Unassigned
20.04
Fix Released
High
Unassigned
20.10
Fix Released
High
Robert Lyon

Bug Description

In your browser with the debug console visible to see javascript output

Have a site and go to the Create -> Files page

Upload an image and then edit it and change the
name: Image<script>console.log('bad name!');</script>one
description: This is Image<script>console.log('bad description!');</script>one description

Create a new folder called:
Folder<script>console.log('bad folder!');</script>one

Go into the new folder and upload another file

Problem 1 you see 'bad folder!' in the console bar

Create a page and add an image block to the page and select the image with bad name

Problem 2 you see 'bad name!' in console bar

Save block and then edit it again

Problem 3 you see 'bad name!' in console bar again

Add the folder block to the page

Problem 4 you see 'bad folder!' in the console bar

CVE References

Revision history for this message
Robert Lyon (robertl-9) wrote :

This is most likely an issue in the group / institution / site areas as well as they all use the same js files to do the filebrowser so when it comes to testing / verifying do check there as well

Revision history for this message
Robert Lyon (robertl-9) wrote :

To be posted in the security forum:

Avoid file or folder names containing JavaScript from being executed

Severity: High
Vulnerability type: Cross Site Scripting (XSS)

In Mahara 19.04 before 19.04.6, 19.10 before 19.10.4, and 20.04 before
20.04.1, certain places could execute file or folder names containing
JavaScript.

Reported by: Adesh Nandkishor Kolte
Bug report: https://bugs.launchpad.net/mahara/+bug/1888163
CVE reference: CVE-2020-15907

Link CVE number above to https://cve.mitre.org/cgi-bin/cvename.cgi?name=2020-15907

Robert Lyon (robertl-9)
information type: Private Security → Public Security
Robert Lyon (robertl-9)
Changed in mahara:
milestone: 20.10.0 → none
no longer affects: mahara
To post a comment you must log in.
This report contains Public Security information  
Everyone can see this security related information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.