Skip to content
File upload Disclosed report Beginner

Arbitrary file upload and stored XSS via ███ support request

The support request form allowed uploading files of any type, including SVG and HTML. An attacker could upload a malicious SVG that executes script when opened by a support representative, potentially leading to credential theft.

z32 Follow

Originally disclosed on HackerOne

  • Triaged in 24 hours
  • Fixed in 9 months
  • Disclosed after 10 months

Summary: A malicious user can upload files of any type when submitting a support request.

Impact

This would allow the attacker to upload malicious executable files as well as .html or .svg files which would allow the attacker to execute malicious code on behalf of the ████ customer support representative.

Step-by-step Reproduction Instructions

  1. Browse to████████ and create an account or sign in if you already have an account.
  2. Click █████ Faculty/Staff IT Support.

█████████ 3. Click ██████ Support

██████████ 4. Complete the form and upload a file of your choice. Click Submit.

█████████ 5. You will see that your request has been created, and your files are readily available for download.

█████████ 6. If the customer support representative downloads the executable, their machine could be compromised. This is unlikely, however what is more likely is for the representative to open a malicious .svg (or .xls/.doc/etc.) file.

██████████ 7. Opening the .svg file in a browser would fire the XSS.

███████ 8. Instead of the alert(XSS) payload, an attacker could use window.location to redirect the user to a malicious website. They could also craft a fake login page that would appear to be the ████████ login page. Once the unsuspecting user submits their credentials, the malicious page would redirect the user to the real login page and the users credentials would be stored on the attackers machine.

Suggested Mitigation/Remediation Actions

Whitelist allowed file types for upload (.pdf, .jpg, etc) as needed.

Impact

This would allow the attacker to upload malicious executable files as well as .html or .svg files which would allow the attacker to execute malicious code on behalf of the █████ customer support representative.

The original report as published on HackerOne, by z32. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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

Impact

An attacker could upload executable files or malicious SVG/HTML files; if a support representative opens them, code could execute, potentially leading to credential theft via a fake login page.

What the attacker needed

A free account; victim opens the uploaded file

The fix

The application should whitelist allowed file types for upload, such as PDF and JPG.

How it was found

  1. Create an account or sign in.
  2. Navigate to the Faculty/Staff IT Support section.
  3. Click on Support.
  4. Fill out the form and upload a file of your choice, then submit.
  5. The request is created and the uploaded file is available for download.
  6. A support representative opens the uploaded file, such as an SVG, which can execute code.

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 feature accepted any file, not just safe ones like PDFs. An attacker could upload a file that runs code when opened, such as an SVG image with a script inside. If a support person opened it, the script could steal their login details.

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.

More by z32

View all

18 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Unrestricted file upload

The lesson behind this report.

An upload feature accepts a file that the server or other users' browsers then treat as code or as something trusted.