taogogo / taocms

taoCMS is an incredible tiny CMS( Content Management System) , writen in PHP and support MySQL/Sqlite as the database(MIT License)
MIT License
60 stars 21 forks source link

arbitrary file read vulnerability #13

Open bkfish opened 2 years ago

bkfish commented 2 years ago

poc

After login as admin,file manager and downloadfunction image after change path param can read arbitrary file image

analysis

location:include/File.php image

image we can use ../ to traverse to the previous directory

suggest

you can check path ,for example check if it has .. then refuse this request