Interstitial redirect bypass / open redirect in https://hackerone.com/zendesk_session
A HackerOne link on the trusted hackerone.com domain passed a return_to value into Zendesk's account-redirect endpoint, which forwards between accounts without an interstitial warning. An attacker could craft such a link so a victim lands on an untrusted site without the usual warning page.
Originally disclosed on HackerOne
- Triaged in 9 hours
- Fixed in 33 days
- Paid in 34 days
- Disclosed after 34 days
Summary by the program
Links with hackerone.com domain were treated as trusted links, including those followed by /zendesk_session. Anyone can create a custom Zendesk account that redirects to an untrusted website and provide it in /redirect_to_account?state= param; and because Zendesk allows redirecting between accounts without interstitial, you'd be taken to the untrusted site without any warning.
Given that the origin of the issue is within Zendesk, we've chosen to identify the links with zendesk_session as external links which would render an external icon and an interstitial warning page when clicked.
The report
Hi guys , I have found a way to use the open redirect vulnerability that zendesk refused to fix and we discussed it in #101146 to bypass intristial redirect. in #101146 , @bencode said :
I tend to agree with Zendesk, we don't really see any security issues with it. We use our interstitial to warn the user and it's clear you are on a separate site.
Well , using this issue I could bypass the interstitial redirect. #PoC: Clicking here will bypass interistial redirect and get you on evil.com
The link is https://hackerone.com/zendesk_session?locale_id=1&return_to=https://support.hackerone.com/ping/redirect_to_account?state=compayn:/ which is used to redirect to generate a zendesk session.
This can be fixed from your end , by detecting the /ping/redirect_to_account in the return_to parameter.
Thanks
Context
HackerOne uses Zendesk for support. The hackerone.com domain hosts a Zendesk session endpoint at /zendesk_session, which accepts a return_to parameter and redirects the user there after establishing a session. Zendesk also provides a feature to redirect between Zendesk accounts without showing an interstitial warning page, via the path /ping/redirect_to_account?state=. The program treats links on hackerone.com as trusted, so they are not shown with an external-link icon or an interstitial warning. The report describes how combining these two behaviours allows an attacker to bypass the interstitial and send a user to an untrusted site.
Setup
No special accounts or tools are described. The researcher only needs to craft a URL. The precondition is that the target uses Zendesk and exposes a session endpoint that accepts a return_to parameter, and that Zendesk's cross-account redirect does not show an interstitial. The report references a previous discussion, #101146, where Zendesk declined to fix an open redirect because they rely on the interstitial to warn users.
Finding it
The researcher found that the return_to parameter of https://hackerone.com/zendesk_session can be pointed at Zendesk's /ping/redirect_to_account endpoint. Because the link starts with hackerone.com, it is considered trusted and no interstitial is shown. By pointing return_to at a Zendesk account that itself redirects to an untrusted site, the user is taken to that site without any warning. The researcher quotes @bencode from #101146:
I tend to agree with Zendesk, we don't really see any security issues with it. We use our interstitial to warn the user and it's clear you are on a separate site.
The finding is that this interstitial can be bypassed.
Exploitation
Step 1: Craft the link
The researcher provides the following link:
https://hackerone.com/zendesk_session?locale_id=1&return_to=https://support.hackerone.com/ping/redirect_to_account?state=compayn:/
The link uses the zendesk_session endpoint with locale_id=1 and a return_to value that points to https://support.hackerone.com/ping/redirect_to_account?state=compayn:/. The state parameter contains compayn:/; the report does not explain what it identifies. The report does not describe how that account was created or what the untrusted site is.
Step 2: User clicks
When a user clicks the link, the zendesk_session endpoint processes the return_to parameter and redirects the user to the support.hackerone.com URL. Because the original link is on hackerone.com, it is treated as trusted and no interstitial is shown. The Zendesk redirect endpoint then forwards the user to the untrusted site without any warning. The researcher states: "Clicking here will bypass interistial redirect and get you on evil.com".
Root cause
The return_to parameter of the zendesk_session endpoint accepts Zendesk's own /ping/redirect_to_account endpoint, which in turn redirects to an external site without an interstitial. which in turn redirects to an arbitrary external site without an interstitial. The existing defence, the interstitial warning, is bypassed because the initial link is on a trusted domain and the final redirect happens through Zendesk's own redirect mechanism. The report suggests that the issue can be fixed by detecting /ping/redirect_to_account in the return_to parameter.
Impact
An attacker can craft a link on hackerone.com that appears trusted but redirects the user to an untrusted site without any warning. The program's summary states that they have chosen to identify links with zendesk_session as external links, which would render an external icon and an interstitial warning page when clicked.
Fix
The program's summary says: "Given that the origin of the issue is within Zendesk, we've chosen to identify the links with zendesk_session as external links which would render an external icon and an interstitial warning page when clicked." The researcher also suggested detecting /ping/redirect_to_account in the return_to parameter.
Variants to test
- Other Zendesk-hosted domains that expose a session endpoint with a
return_toparameter. A positive result is a link on a trusted domain that redirects to an external site without an interstitial. - Other parameters that accept URLs and are used in redirects, such as
redirect_to,next,url, orreturn. A positive result is an open redirect that bypasses the interstitial. - Zendesk's
/ping/redirect_to_accountendpoint on other subdomains. A positive result is that the endpoint redirects to an arbitrary external site without warning.
Hunting notes
This kind of bug tends to hide in redirect endpoints that accept a URL parameter and are hosted on trusted domains. During recon, look for endpoints like /zendesk_session, /redirect, /login, or any parameter that contains a URL. Signals include parameters named return_to, redirect_to, next, or url. To show impact, demonstrate that the redirect bypasses an existing security control, such as an interstitial warning, and that the final destination is an untrusted site. The researcher showed impact by providing a clickable link that bypasses the interstitial and lands on an untrusted site, which the program addressed by marking such links as external.
What happened, in plain words
HackerOne is a platform where security researchers report bugs to companies. To handle support questions, HackerOne uses a separate product called Zendesk. Zendesk is a helpdesk system: companies use it to run support inboxes and help pages, and it can host many different customer accounts under its own domain.
When you click a link on a website, the site can send you somewhere else. That is called a redirect. Redirects are normal and useful, but they become dangerous when a site lets anyone choose the destination. A redirect that will send you to any address someone types in is called an open redirect. Attackers like open redirects because a link that starts on a trusted site can end on a malicious one, which is handy for phishing: tricking people into visiting a fake page that steals passwords or installs malware.
Because of that risk, Zendesk shows a warning page, called an interstitial, before sending you from one Zendesk account to another. The interstitial is a stop-and-read screen: it tells you that you are leaving for a separate site, so you can decide whether to continue. Zendesk also has a feature that lets one Zendesk account redirect to another without showing that warning.
HackerOne treats links on its own hackerone.com domain as trusted. Trusted links do not get an external-link icon and do not get the interstitial warning. The researcher found that a link on hackerone.com could be built so that it first passes through HackerOne's Zendesk session endpoint and then through Zendesk's warning-free cross-account redirect, ending on an untrusted site with no warning at all. In other words, the safety screen was skipped.
This report follows an earlier discussion, #101146, where Zendesk had declined to fix an open redirect because they believed the interstitial was enough protection. The researcher quoted that reasoning and then showed a way around it.
Context
HackerOne uses Zendesk for support. The hackerone.com domain hosts a Zendesk session endpoint at /zendesk_session. An endpoint is simply a specific address on a server that does one job, like a counter in a shop that handles one kind of request. This endpoint accepts a parameter called return_to and, after setting up a session, redirects the user to whatever address is in that parameter.
A parameter is the part of a web address after a question mark. In ?colour=blue, the parameter name is colour and its value is blue. Parameters are how a link carries instructions to a website.
A session is a short-lived record that a website keeps about your visit, so it knows who you are from one page to the next. Think of it as a cloakroom ticket: the site gives you a number, and when you come back with it, the site fetches your coat. The report does not describe the session contents in detail; what matters is that the endpoint sets one up and then forwards you.
Zendesk also provides a feature to redirect between Zendesk accounts without showing an interstitial warning page, via the path /ping/redirect_to_account?state=. The state parameter identifies which Zendesk account to send the visitor to.
The program treats links on hackerone.com as trusted, so they are not shown with an external-link icon or an interstitial warning. The report describes how combining these two behaviours allows an attacker to bypass the interstitial and send a user to an untrusted site.
Setup
No special accounts or tools are described. The researcher only needs to craft a URL. A URL is just a web address, the text you type into the browser's address bar.
The precondition is that the target uses Zendesk and exposes a session endpoint that accepts a return_to parameter, and that Zendesk's cross-account redirect does not show an interstitial. The report references a previous discussion, #101146, where Zendesk declined to fix an open redirect because they rely on the interstitial to warn users.
Finding it
The researcher found that the return_to parameter of https://hackerone.com/zendesk_session can be pointed at Zendesk's /ping/redirect_to_account endpoint. Validation means checking that a value is allowed before using it. Here, the value was accepted without checking where it pointed.
Because the link starts with hackerone.com, it is considered trusted and no interstitial is shown. By pointing return_to at a Zendesk account that itself redirects to an untrusted site, the user is taken to that site without any warning.
The researcher quotes @bencode from #101146:
I tend to agree with Zendesk, we don't really see any security issues with it. We use our interstitial to warn the user and it's clear you are on a separate site.
The finding is that this interstitial can be bypassed. The earlier argument was that the warning screen protects users; this report shows a route that never reaches the warning screen.
Exploitation
Step 1: Craft the link
The researcher provides the following link:
https://hackerone.com/zendesk_session?locale_id=1&return_to=https://support.hackerone.com/ping/redirect_to_account?state=compayn:/
Line by line, in plain words:
https://hackerone.com/zendesk_sessionis the trusted HackerOne address that sets up a Zendesk session. Because it is onhackerone.com, the platform will not mark it as external.?starts the list of parameters.locale_id=1tells the endpoint which language or regional setting to use. The report does not explain what1stands for.&separates one parameter from the next.return_to=is the parameter that says where to send the visitor afterwards. Its value is everything after the equals sign.https://support.hackerone.com/ping/redirect_to_account?state=compayn:/is that destination. It is a Zendesk address on thesupport.hackerone.comsubdomain. A subdomain is a prefix on a domain, like a department inside a building:support.hackerone.comis part ofhackerone.combut a separate service.state=compayn:/is the parameter of the Zendesk redirect endpoint.
The link uses the zendesk_session endpoint with locale_id=1 and a return_to value that points to https://support.hackerone.com/ping/redirect_to_account?state=compayn:/.
Why craft it this way? The first hop must be on the trusted domain so that no warning appears. The second hop must be Zendesk's own warning-free cross-account redirect, so that the final jump to the untrusted site also happens without a warning. Each piece is legitimate on its own; the trick is chaining them.
Step 2: User clicks
When a user clicks the link, the zendesk_session endpoint processes the return_to parameter and redirects the user to the support.hackerone.com URL. Because the original link is on hackerone.com, it is treated as trusted and no interstitial is shown. The Zendesk redirect endpoint then forwards the user to the untrusted site without any warning.
The researcher states: "Clicking here will bypass interistial redirect and get you on evil.com".
So the journey is: trusted HackerOne link, then Zendesk session endpoint, then Zendesk cross-account redirect, then the untrusted site. At no point does the browser show the interstitial that Zendesk relies on.
Root cause
The return_to parameter of the zendesk_session endpoint accepts Zendesk's own /ping/redirect_to_account endpoint, which in turn redirects to an external site without an interstitial. which in turn redirects to an arbitrary external site without an interstitial.
The existing defence, the interstitial warning, is bypassed because the initial link is on a trusted domain and the final redirect happens through Zendesk's own redirect mechanism. A defence only works if every route to the dangerous action passes through it; here, one route goes around it.
The report suggests that the issue can be fixed by detecting /ping/redirect_to_account in the return_to parameter.
Impact
An attacker can craft a link on hackerone.com that appears trusted but redirects the user to an untrusted site without any warning.
The program's summary states that they have chosen to identify links with zendesk_session as external links, which would render an external icon and an interstitial warning page when clicked.
Fix
The program's summary says: "Given that the origin of the issue is within Zendesk, we've chosen to identify the links with zendesk_session as external links which would render an external icon and an interstitial warning page when clicked."
The researcher also suggested detecting /ping/redirect_to_account in the return_to parameter.
Variants to test
- Other Zendesk-hosted domains that expose a session endpoint with a
return_toparameter. A positive result is a link on a trusted domain that redirects to an external site without an interstitial. - Other parameters that accept URLs and are used in redirects, such as
redirect_to,next,url, orreturn. A positive result is an open redirect that bypasses the interstitial. - Zendesk's
/ping/redirect_to_accountendpoint on other subdomains. A positive result is that the endpoint redirects to an arbitrary external site without warning.
Hunting notes
This kind of bug tends to hide in redirect endpoints that accept a URL parameter and are hosted on trusted domains. During recon, look for endpoints like /zendesk_session, /redirect, /login, or any parameter that contains a URL. Recon means the early exploration phase where you map out what a target exposes.
Signals include parameters named return_to, redirect_to, next, or url. To show impact, demonstrate that the redirect bypasses an existing security control, such as an interstitial warning, and that the final destination is an untrusted site. The researcher showed impact by providing a clickable link that bypasses the interstitial and lands on an untrusted site, which the program addressed by marking such links as external.
Glossary
- Endpoint: a specific address on a server that performs one job, such as setting up a session or redirecting a visitor.
- Parameter: a named value attached to a URL after a question mark, used to pass instructions to a website.
- URL: a web address, the text typed into a browser to reach a page.
- Redirect: a server response that tells the browser to go to a different address.
- Open redirect: a redirect where the destination can be chosen by anyone, allowing a trusted link to lead to an untrusted site.
- Interstitial: a warning page shown between two steps, asking the user to confirm before continuing to another site.
- Session: a short-lived record a website keeps about a visitor so it can recognise them across pages.
- Subdomain: a prefix on a domain name that points to a separate service, such as
support.hackerone.comunderhackerone.com. - Validation: checking that a value is allowed before using it.
- Phishing: tricking someone into visiting a fake page or handing over credentials by making the request look trustworthy.
- Recon: the exploration phase of a security test, where you map out a target's addresses and features.
- Zendesk: a helpdesk product used by companies to run support inboxes and help pages, which can host many customer accounts.
- HackerOne: a platform where security researchers report bugs to companies.