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.
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:
- Open the Image Options page for an album.
- Press "Add Title / Description"
- Enter some HTML into the title field. In my PoC, I used the following: <marquee><font size=72>XSS
- 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



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
- Open the Image Options page for an album.
- Press the button to add a title or description.
- Enter HTML into the title field.
- 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.