Skip to content
XSS Disclosed report Beginner

Persistent XSS in image title

An image title field accepted HTML without sanitisation, so a stored cross-site scripting payload ran in the browser of anyone who viewed the image. An attacker could execute script in victims' sessions by setting a malicious title.

kasperkarlsson Follow

Originally disclosed on HackerOne

  • Fixed in 3 months
  • Paid in 4 months
  • Disclosed after 5 months

When adding a title to uploaded images, one can insert XSS into the title which is then executed for anyone viewing the image.

PoC (contains a harmless XSS): http://imgur.com/bSZwUBG&rAmpN4O

How to recreate:

  1. Open the Image Options page for an album.
  2. Press "Add Title / Description"
  3. Enter some HTML into the title field. In my PoC, I used the following: <marquee><font size=72>XSS
  4. Save. You are now redirected to the Image Options page, where the XSS is evaluated by the browser.

This XSS is persistent and will execute for anyone who visits the URL, in this case http://imgur.com/bSZwUBG&rAmpN4O

Images from steps 2, 3 and 4 attached.

Attachments

img_step2.png
img_step2.png From the original on HackerOne
img_step3.png
img_step3.png
img_step4.png
img_step4.png

The original report as published on HackerOne, by kasperkarlsson. 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 title was stored and later rendered as HTML without sanitisation or output encoding.

Impact

The injected script is stored and runs for anyone who visits the affected image URL, which could let an attacker act in victims' sessions.

What the attacker needed

An account able to edit album image titles; victim visits the image URL

How it was found

  1. Open the Image Options page for an album.
  2. Press the button to add a title or description.
  3. Enter HTML into the title field.
  4. Save; the page reloads and the browser evaluates the injected HTML.

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 let people type HTML into the title of an image and saved it without cleaning it up. When other people opened that image, their browser treated the saved HTML as part of the page and ran it as code. That let an attacker run their own script inside other users' sessions.

What is XSS?

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

More by kasperkarlsson

View all

2 more disclosed reports, best first.

More from Imgur

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.