Bug Report
The upload feature rejected a renamed PHP file in the browser, but sending the upload via post data allowed a PHP shell disguised as a PDF to be uploaded, which could be a risk to the web server.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 6 days
- Paid in 6 days
- Disclosed after 45 days
Sir,
I want to report a bug in your web which i have found in few minutes ago :)
I have registered In your website and i have found a upload option i want to upload some php files but its saying only .pdf file allowed so i have just change my (.php) file extension to (.pdf) first its saying not allowed its not a pdf file or file is corrupted... But when i try to upload it using post data i have successfully uploaded corrupted file
here is my proof:
its a php shell
if a attacker can change the value and successfully upload .php file using http request it can be risk for your webserver :)
Thanks
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server relied on client-side validation and did not properly verify the file type or content on the server side.
Impact
An attacker could upload a PHP shell disguised as a PDF, which could be a risk to the web server.
What the attacker needed
A free account; ability to intercept HTTP requests
How it was found
- Register on the website and find the file upload feature.
- Attempt to upload a PHP file and observe that only .pdf files are allowed.
- Change the file extension from .php to .pdf and try to upload; the site rejects it as not a valid PDF.
- Send the upload using post data instead of the normal form.
- Successfully upload the PHP shell disguised as a PDF.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
A website allowed a file upload but rejected a renamed PHP file through the normal form. By sending the upload as post data, the attacker uploaded a malicious script that the server might execute.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.