Last updated
Last updated
This vulnerability was reported by
Source link for the reported vulnerabilities are as follows:
https://huntr.com/bounties/b7753929-b7bf-4072-9ff0-1ff62baba278/
The problem with the following code is that belongId
is something which is user-controlled input and since it is being concatenated to the path which is later used for saving the uploaded file. Now, since we control the belongId
we can just give ../
characters to traverse through the system.
The patch is rather simple but effective here as now there's a check for /
character in the belongId
, if there is an exception will be thrown.
It is very important to look into the functions which handles file based operations and if the user-controlled data is being processed in any way which can affect the path of the files.