You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using simple-ajax-uploader for a big project and as usual before I push 3rd party code on production I inspect the code. Sadly I found a big security issue with this one...
A user is able to upload a file using the XHR uploader and set a filename of this type: ../../test.txt
All you have to do is to open your browser dev tools and go to the network tab. First upload the test.txt as you would normaly do, and after the upload finishes, click on the logged connection and select Edit and resend. Then, simply change the filename to something like this: ../../test.txt. From my tests the file will be not saved in the upload dir but 2 directories up (or wherever you point it).
To fix this security hole just replace line 93 on Uploader.php with the following:
Hello,
I am using simple-ajax-uploader for a big project and as usual before I push 3rd party code on production I inspect the code. Sadly I found a big security issue with this one...
A user is able to upload a file using the XHR uploader and set a filename of this type: ../../test.txt
All you have to do is to open your browser dev tools and go to the network tab. First upload the test.txt as you would normaly do, and after the upload finishes, click on the logged connection and select Edit and resend. Then, simply change the filename to something like this: ../../test.txt. From my tests the file will be not saved in the upload dir but 2 directories up (or wherever you point it).
To fix this security hole just replace line 93 on Uploader.php with the following:
The text was updated successfully, but these errors were encountered: