Skip to content
XSS Disclosed report Beginner

IFXSS (image filename XSS) by creating a new Photo Gallery

A photo gallery feature stored an uploaded image's filename without proper handling, so a filename containing an event handler attribute was rendered as markup. An attacker could get script to run in the browser of anyone who viewed the published gallery.

jimeno Follow

Originally disclosed on HackerOne

  • Triaged in 3 days
  • Fixed in 14 days
  • Disclosed after 15 days

Hello team! I think I've found a Stored XSS in the Photo Gallery. To reprodruce the possible vulnerability we must:

  1. Login into our account.
  2. Go to https://staging.uzbey.com/user/other-albums and click on the "add new album" button.
  3. Add random values and any image with this name ---> "onerror="alert(1)"a=".jpg
  4. Publish your gallery.
  5. XSS!

Also, if you click on the image error icon you will obtain the alert. I will attach a few images as a little help for understand my Proof of Concept of the vulnerability. Kind regards.

Attachments

done1.png
done1.png From the original on HackerOne
done.png
done.png
test4.png
test4.png

The original report as published on HackerOne, by jimeno. 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

Root cause

Likely the image filename was inserted into HTML markup without encoding or validation, so characters in the name were treated as attributes and script.

What the attacker needed

A user account; ability to upload an image; victim views the published gallery

How it was found

  1. Log in to your account.
  2. Open the other-albums page and start a new album.
  3. Add random values and upload an image whose filename contains an event handler attribute.
  4. Publish the gallery.
  5. The script runs, and it also runs when the image error icon is clicked.

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.

When you upload a photo, the site keeps the file's name and later shows it on the page. If the site puts that name into the page as if it were part of the page's code, a name crafted to look like code can run as a script in a visitor's browser. That is called stored cross-site scripting, because the harmful value is saved on the server and served to others.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More from Uzbey

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.