Gym Management System 1.0 – Unauthenticated Remote Code Execution
Gym Management System version 1.0 suffers from an Unauthenticated File Upload Vulnerability allowing Remote Attackers to gain Remote Code Execution (RCE) on the Hosting Webserver via uploading a maliciously crafted PHP file that bypasses the image upload filters. Attackers can access the '/upload.php' page, set the 'id' parameter of the GET request to the desired file name for the uploaded PHP file, bypass the extension whitelist by adding a double extension, with the last one as an acceptable extension (png), bypass the file type check by modifying the 'Content-Type' of the 'file' parameter to 'image/png' in the POST request, and set the 'pupload' paramter to 'upload'. In the body of the 'file' parameter of the POST request, insert the malicious PHP code and the Web Application will rename the file to have the extension with the second item in an array of acceptable extensions, and store it in the '/upload/' directory. Access the uploaded file via the '/upload/' directory, and execute the malicious PHP code by passing a command in the 'telepathy' parameter of the GET request.