apps.owncloud.com: XSS via referrer
The Referer header was inserted unescaped into an onclick attribute of a cancel button, allowing an attacker to inject JavaScript that executes when the button is clicked. An attacker could craft a link with a malicious Referer value to run script in the victim's browser.
Originally disclosed on HackerOne
- Triaged in 4 hours
- Fixed in 15 days
- Disclosed after 53 days
Look at next request:
Host: apps.owncloud.com User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Referer: http://www.myevilsite.com/qwe';alert(1)+'
in response page referrer pasts into onclick event of a cancel button
onclick="location.href='http://www.myevilsite.com/qwe';alert(1)+'?PHPSESSID=icqgmh3h639vn6a75j6idmj935'" />
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
Impact
An attacker could execute JavaScript in a victim's browser if the victim clicks the affected button.
What the attacker needed
Victim clicks the cancel button; attacker can control the Referer header
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 visit a website, your browser sends a 'Referer' header telling the site where you came from. This site put that header value directly into a button's click action without cleaning it, so an attacker could make the button run their own code. That is cross-site scripting (XSS): running attacker-controlled JavaScript in a victim's browser.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.