Skip to content
XSS Disclosed report Beginner

Persistent XSS in https://p.imgur.com/albumview.gif and http://p.imgur.com/imageview.gif / post statistics

A parameter in the albumview.gif and imageview.gif endpoints was not properly escaped, allowing an attacker to inject HTML and JavaScript that would execute in a victim's browser. The reporter demonstrated this with example URLs containing script tags.

sleepprogger Follow

Originally disclosed on HackerOne

  • Fixed in 8 hours
  • Paid in 16 days
  • Disclosed after 41 days

Summary by the program

In p.imgur.com/albumview.gif, a post paramater could be set containing html and javascript. This was not escaped properly and the code would be executed.

The reporter used the following example URLs as a proof of concept
https://p.imgur.com/albumview.gif?a=F78FO&r=https://community.imgur.com/<script>alert(2)</script>
http://p.imgur.com/imageview.gif?a=kCaIJRa&r=https%3A%2F%2Fcommunity.imgur.com/%3Cscript%3Econsole.log%28%27XSS%27,$.cookie%28%29%29%3C/script%3E
https://p.imgur.com/albumview.gif?a=F78FO&r=https://community.imgur.com/"><script>alert(2)</script>

The original report as published on HackerOne, by sleepprogger. 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 application failed to HTML-encode or validate the 'r' parameter before reflecting it into the generated image response.

What the attacker needed

Victim clicks a crafted link

How it was found

  1. Craft a URL to the albumview.gif endpoint with a malicious script in the 'r' parameter.
  2. Send the URL to a victim or trick them into visiting it.
  3. The script executes in the victim's browser.

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.

Here, a parameter was not escaped, so a script tag in the URL would run.

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 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.