-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flatpress 1.2.1 - File upload bypass to RCE Vulnerebility #152
Comments
Hello, everyone, I unfortunately successfully reproduced the security issue on FlatPress fp-1.3.dev [master] and PHP version 7.4.30. A possible solution could be to prevent the upload of php files via uploader. So that PHP files in the attachs folder cannot be called directly, you can add an additional htaccess with the following rule for this folder as a temporary solution:
This is then only valid for this folder. Best Regards |
Hi, thank you very much for reporting. FlatPress 1.2 didn't check uploaded files properly at all (even if the changelog said it did).
Which I am ashamed of, totally missed this. Thank you very much for re-reporting here. |
Hello, everyone, the bug fix for the issue was successfully tested in the following upload scenarios: Single file: shell.php ;File was not placed in the attachs images directory as expected. ✔️ Mixed selection - only allowed file types; *.png, *.gif, *.jpg, *.zip, *rar, *.mp4 and *.avi; Files were placed in the images and attachs directory as expected. ✔️ Mixed selection - allowed file types with forbidden file type; *.png, *.gif, *.jpg, *.php, *.zip, *rar, *.mp4 and *.avi; ;PHP file was not placed in the attachs images directory as expected. ✔️ In my test, I was also able to successfully upload the *.js file type. This file type could potentially be exploited for similar vulnerabilities.
Conclusion: Bugfix request has been successfully tested on fp-1.3.dev [master]. I have created a new issue to address the issue. Best Regards |
File upload bypass to RCE
Severity: High
Description:
It is observed that the application has the functionality to upload images and download them further. The
download functionality is not sandboxed, and it does not have proper security control which can be
bypassed by tricking webserver and uploading dangerous file types which leads to RCE.
Technical Impact:
A privileged attacker can use the upload functionality to gain access to the server
Suggested Remediation:
extensions to upload.
Steps to Reproduce:
Payload:
GIF89a;
are getting executed
Payload: ?cmd=cat+/etc/passwd
Opening issue here, Got no reply from [email protected] for 2 months
The text was updated successfully, but these errors were encountered: