Reflected XSS in m.imgur.com
The mobile version of imgur.com reflected a username from the URL into the page without sanitising angle brackets, allowing an attacker to inject HTML and JavaScript. An attacker could trick a logged-in user into clicking a crafted link, executing malicious JavaScript in the user's session and potentially stealing credentials or session data.
- Triaged in 26 days
- Fixed in 14 months
- Paid in 2.1 years
- Disclosed after 15 months
There is a reflected XSS vulnerability in https://m.imgur.com as shown below:
It appears that the username field in the url does not sanitize angle bracket characters on the mobile version of the site, allowing an attacker to execute arbitrary Javascript on the m.imgur.com domain.
I have attached several screenshots demonstrating this attack in the mobile context. While this attack affects devices loading the mobile site, I did notice that requests made with the standard User-Agent would issue a 302 redirect to the standard site, throwing a 404 error. This attack does execute on browsers that load the mobile version of the site.
The impact of this vulnerability is variable, depending on how it is used. An attacker could use this vulnerability to target a specific victim or post it on a site such as reddit, which is frequented by users of this application. If an authenticated imgur user could be tricked into clicking the link it may result in malicious JavaScript executing in the context of the user's session and could result in credential/session theft or other targeted attacks. This could result in multiple compromised accounts.
This vulnerability was tested in Google Chrome Version 51.0.2704.103 using the following User-Agent from the developer tools to load the mobile site:
User-Agent: Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36
To mitigate this vulnerability, consider encoding any angle brackets (< >) reflected back to the user when handling user input.
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
The mobile site reflected the username from the URL into the page without encoding angle brackets, allowing HTML injection.
Impact
If an authenticated user is tricked into clicking the link, malicious JavaScript could execute in their session, potentially leading to credential or session theft and multiple compromised accounts; the attack only works on browsers that load the mobile version of the site.
What the attacker needed
Victim uses mobile version of site; victim clicks a crafted link; victim is logged in for session theft
The fix
The site should encode angle brackets in any user input that is reflected back to the user.
How it was found
- Craft a URL for the mobile site's messages page with a username containing HTML and JavaScript.
- Open the URL in a browser that loads the mobile version of the site.
- The injected JavaScript executes in the context of the m.imgur.com domain.
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 a website takes something from the web address (like a username) and puts it directly on the page without cleaning it first, an attacker can include special characters that make the browser run code. This is called reflected cross-site scripting (XSS). Here, the mobile site failed to clean up angle brackets, so an attacker could make a link that runs their own JavaScript when a victim clicks it.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.