Unrestricted File Upload to ███████SubmitRequest/Index.cfm?fwa=wizardform
The request submission form allowed uploading files of any type under 5 MB. An attacker could upload a malicious executable or PHP file, potentially gaining remote code execution if a staff member opened it or if the file could be browsed to.
- Triaged in 9 hours
- Fixed in 5 days
- Disclosed after 3 months
Summary:
An attacker is able to upload files of any type to ███SubmitRequest/Index.cfm?fwa=wizardform as long as they are less than 5 MB.
Description: The █████ ████ Request System allows a user to submit requests to the ██████████ ███ for event support. An attacker can exploit this request form by uploading malicious files due to an unrestricted file upload feature.
Impact
An attacker is able to upload malicious files onto the server. These files are attached to a request for support from the ██████ █████████. If a member of the ██████ ████ were to open the malicious file, the attacker could gain remote code execution on ████ information systems. Alternatively, if the attacker finds out how to browse to the file, they could obtain a web shell on the target, giving them remote code execution.
Step-by-step Reproduction Instructions
- Browse to
██████PublicSite/index.cfm?fwa=newreqand click onCreate a New Request.
██████████
2. Fill in your e-mail address and click Submit.
██████████ 3. Fill out the fields in the form.
███
████
███
███████
4. Before submitting the request, click the Upload Files tab.
█████ 5. This page will allow you to upload any file you wish as long as it is under 5MB in size. I tested by uploading an executable (visual studio community installer) and a php file. These files were deleted from my request after submitting this report.
███████ 6. Once uploaded, you can submit your request. An attacker would need to submit this request in hopes of the █████ ████████ downloading the malicious attachment.
Suggested Mitigation/Remediation Actions
Restrict file uploads to safe extensions such as .jpg, .png, etc. to prevent an attacker from uploading malicious files onto the server.
Impact
An attacker is able to upload malicious files onto the server. These files are attached to a request for support from the ████ ██████████. If a member of the ████ ██████████ were to open the malicious file, the attacker could gain remote code execution on ██████ information systems. Alternatively, if the attacker finds out how to browse to the file, they could obtain a web shell on the target, giving them remote code execution.
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 upload handler did not validate file type or extension, only enforcing a size limit.
Impact
An attacker could upload malicious files; if a staff member opened one, or if the attacker could browse to the uploaded file, they could gain remote code execution.
What the attacker needed
Access to the public request form; file under 5 MB; victim opens the uploaded file or file is browsable
The fix
Restrict uploads to safe file extensions such as images.
How it was found
- Go to the public site's new request page and choose to create a new request.
- Enter an email address and submit.
- Complete the form fields.
- Open the Upload Files tab before submitting.
- Upload any file under 5 MB, such as an executable or a PHP file.
- Submit the request so the malicious attachment is sent.
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 file upload form should check what kind of file is being sent. Here it accepted anything, including programs that can run code. If someone at the organisation opens such a file, or if the file can be reached through the website, the attacker could take control of the server.
What is File upload?
An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.