prasathmani / tinyfilemanager

Single-file PHP file manager, browser and manage your files efficiently and easily with tinyfilemanager
https://tinyfilemanager.github.io
GNU General Public License v3.0
4.61k stars 1.63k forks source link

XSS in Filename #1098

Open whitej3rry opened 8 months ago

whitej3rry commented 8 months ago

Hi @prasathmani,

I have discovered a Filename based *Cross Site Scripting Vulnerability** in all versions including the latest. The vulnerability allows to execute javascript and html scripts in the directory listing page.

Steps to reproduce the vulnerability:

  1. Create a file on server with the crafted name (XSS)
  2. Browser through the directory where that file is placed
  3. Javascript will be executed as shown below
xss2 xss1

I hope you would patch this issue during the next update to the file manager.

Thanks, Dani

whitej3rry commented 6 months ago

@prasathmani

prasathmani commented 6 months ago

Thank you for reporting. Will fix it for the future release.