Out-of-Band (OOB) Server-Side Request Forgery (SSRF) Via File Upl
A file upload feature checked only the file extension and not the file content, so an HTML file saved with a .png name could be uploaded and stored at a public location. When opened in a browser, the file caused the victim's browser to send a file to an attacker-controlled server, and the attacker could then retrieve it.
Published on medium.com
File upload features are everywhere — profile pictures, reports, documents, logs. Most developers treat them as low-risk functionality once file type and size checks are in place.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could trick a victim into uploading a file that is then sent to the attacker's server, allowing the attacker to retrieve it.
What the attacker needed
Upload feature access; victim opens the uploaded file; attacker-controlled server
How it was found
- Go to the Header Logo upload feature, which accepts image files.
- Save an HTML file with a .png extension and upload it via the Publish button.
- Capture the upload request in a proxy tool and change the extension and Content-Type.
- Note the public location where the uploaded file is stored.
- Open the uploaded file in a browser to trigger the outbound request.
- Upload a sample PDF and observe it reaching the attacker-controlled server, then retrieve it via the copied value.
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 write-up has not been written yet. The Original tab links to the source.
A website let people upload images, but it only looked at the file name ending, not what was actually inside the file. Someone could upload a web page disguised as an image, and when a victim opened it, their browser quietly sent a file to a server the attacker controlled. The attacker could then download that file.
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.