Skip to content
Open redirect Disclosed report Beginner

Open redirect in "Language change".

The language chooser did not strip excess slashes and the web server responded to internal requests from other FQDNs, which together caused an unwanted redirect when changing language.

Seif Elsallamy Follow

Originally disclosed on HackerOne

Bounty$500 View original
  • Triaged in 42 hours
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 3 months

Summary by the program

This report turned out to equate to three different issues:

  • The language chooser not stripping excess slashes correctly.
  • Our web server responding to internal requests from other "FQDNs", which caused the unwanted redirect.
  • CloudFlare returning error 523 when attempting to access one of those URLs.

We awarded a single bounty for the first two issues since they require each other to do anything possibly unwanted/malicious. As the last issue (the incorrect CloudFlare error pages) was solely at the CloudFlare level (and outside any of our control), it is not eligible for a bounty on its own.

The report

Hi guys! Urls: https://hackerone.com//example.com/ru/faq and https://hackerone.com//example.com/faq or https://hackerone.com//example.com/disclosure-guidelines and https://hackerone.com//example.com/ru/disclosure-guidelines scroll down > at the right side change the language to English you will go to http://example.com Thank you.

The original report as published on HackerOne, by seifelsallamy. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

HackerOne's site has a language chooser that lets a visitor switch the interface language. The chooser is rendered on pages such as the FAQ and the disclosure guidelines, and it sits on the right-hand side of the page after you scroll down.

The report was filed against HackerOne and disclosed on 19 June 2015. The program's own summary states that the submission turned out to cover three separate issues, and that a single bounty of 500.00 USD was awarded for the first two.

Setup

No accounts, roles, tools or versions are described. The researcher worked with ordinary browser navigation against public pages of hackerone.com. The only precondition is that the page carries the language chooser, which the FAQ and disclosure guidelines pages do.

Finding it

The researcher gave four URLs with a doubled slash, a foreign hostname and a real path, and said changing the language sends you to http://example.com. The four URLs given are:

Text
https://hackerone.com//example.com/ru/faq

and

Text
https://hackerone.com//example.com/faq

or

Text
https://hackerone.com//example.com/disclosure-guidelines

and

Text
https://hackerone.com//example.com/ru/disclosure-guidelines

The researcher then used the language chooser on that page as the trigger.

Exploitation

Step 1: open a crafted URL

Load one of the URLs above, for example:

Text
https://hackerone.com//example.com/ru/faq

Nothing has happened yet; the page looks normal.

Step 2: scroll to the language chooser

Scroll down the page. On the right-hand side there is the language selector.

Step 3: change the language to English

Select English in the chooser. The browser is sent to:

Text
http://example.com

That is the whole exploit: a page on hackerone.com redirects the visitor off-site to an arbitrary host supplied in the URL path.

Root cause

The program's summary breaks the failure into three parts:

  1. The language chooser did not strip excess slashes correctly.
  2. The web server responded to internal requests from other "FQDNs", which caused the unwanted redirect.
  3. CloudFlare returned error 523 when attempting to access one of those URLs.

The program notes the first two issues require each other to do anything possibly unwanted or malicious. and the program notes they require each other to do anything possibly unwanted or malicious. The third is a CloudFlare-level behaviour, outside the program's control, and was not eligible for a bounty on its own.

Impact

The result is an open redirect: a link that starts on the trusted hackerone.com domain and ends on an attacker-chosen host. The program's wording is careful: the two issues "require each other to do anything possibly unwanted/malicious". The report itself does not describe any further consequence beyond the redirect to http://example.com.

Fix

The report does not state what was changed. The program's summary describes the two defects: the language chooser not stripping excess slashes correctly, and the web server responding to internal requests from other FQDNs.

Variants to test

  • Doubled slashes before a hostname on other paths that carry a language or locale switcher, for example //attacker.example/ru/faq. A positive result is the page loading normally and the switcher sending you to attacker.example.
  • The same pattern on other locale-prefixed paths (/ru/, and other language codes) to see whether the prefix changes how the path is parsed.
  • Other pages that render the same chooser, such as guidelines or help pages. A positive result is the same off-site redirect after changing language.
  • Backslash variants and mixed slash/backslash sequences in the same position, checking whether the chooser normalises them the same way.

Hunting notes

This kind of bug hides in features that build a redirect from the current URL: language switchers, locale pickers, "return to" links and canonicalisation redirects. During recon, look for pages whose URL contains a locale segment and which offer a language control; then try inserting a foreign hostname after a doubled slash and see whether the page still resolves. The signal that something is wrong is a page that loads despite an obviously foreign segment in its path. The researcher demonstrated impact simply and convincingly: a real page on the target domain, one click on the language chooser, and the browser landing on http://example.com.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 7 min read.

What happened, in plain words

HackerOne is a website where security researchers report bugs to companies. Its pages can be shown in several languages, and there is a small language chooser on the right-hand side of pages such as the FAQ and the disclosure guidelines.

The researcher found that a link which starts on hackerone.com but has an extra slash and a foreign website name tucked into it, when the language is changed, sends the visitor to http://example.com. Then, using the language chooser on that page, the visitor is sent away to http://example.com, a site chosen by whoever made the link. That is called an open redirect: a trusted site's link that ends up somewhere else.

The program looked into it and found the submission actually covered three separate problems. It paid a single bounty of 500.00 USD for the first two, because they need each other to do anything unwanted. The third was a CloudFlare behaviour outside the program's control and was not eligible for a bounty on its own. The report was disclosed on 19 June 2015.

Background you need first

A few ideas come up again and again below, so here they are from zero.

  • URL: the address you type in a browser, like https://hackerone.com/faq. It has a scheme (https), a host (hackerone.com) and a path (/faq).
  • Path: the part after the host that points at a particular page. Slashes separate the pieces of a path.
  • Redirect: when a website answers your request by telling the browser "go and load this other address instead". You see the page change without typing anything. Think of a receptionist pointing you to a different desk.
  • Open redirect: a redirect where the destination can be chosen by whoever crafts the link, rather than by the site. It matters because the link starts on a trusted domain, so people may click it without suspicion.
  • Language chooser (locale switcher): a control on a page that lets you pick the language of the interface. To keep you on the same page, it has to build a new address from the current one, and that building step is where this bug lived.
  • FQDN: "fully qualified domain name", the complete name of a machine on the internet, such as hackerone.com or example.com.
  • CloudFlare: a service that sits in front of many websites, passing visitors' requests through to the real server and showing its own error pages when something goes wrong.

No accounts, tools or software versions are needed to follow this. The researcher used an ordinary browser on public pages of hackerone.com. The only requirement is a page that has the language chooser, which the FAQ and disclosure guidelines pages do.

Finding it

The researcher gave four addresses with a doubled slash after the host, then a foreign hostname, then a real path. The four addresses given are:

Text
https://hackerone.com//example.com/ru/faq

and

Text
https://hackerone.com//example.com/faq

or

Text
https://hackerone.com//example.com/disclosure-guidelines

and

Text
https://hackerone.com//example.com/ru/disclosure-guidelines

Line by line, in plain words:

  • https://hackerone.com is the real site, so the browser is genuinely talking to HackerOne.
  • //example.com is the interesting part. Normally a single slash separates the host from the path. Here there are two slashes and then a foreign hostname, so the address looks like it is pointing at example.com while actually still starting at hackerone.com.
  • /ru/faq or /faq is a real page path: the FAQ, in Russian (ru) or in the default language.
  • /disclosure-guidelines and /ru/disclosure-guidelines are the same idea on the disclosure guidelines page.

The researcher then used the language chooser on that page as the trigger.

Exploitation

Step 1: open a crafted URL

Load one of the addresses above, for example:

Text
https://hackerone.com//example.com/ru/faq

What this does: the browser asks HackerOne for that path. Nothing has happened yet, and the page looks normal.

Step 2: scroll to the language chooser

Scroll down the page. On the right-hand side there is the language selector. This step is just to reach the control that will do the redirecting.

Step 3: change the language to English

Select English in the chooser. The browser is sent to:

Text
http://example.com

What this does: the chooser builds a new address from the page you are on and sends the browser there. Because the foreign hostname was sitting in the path, the built address ends up pointing at example.com instead of a HackerOne page. That is the whole exploit: a page on hackerone.com redirects the visitor off-site to a host supplied in the URL path.

Root cause

The program's summary breaks the failure into three parts:

  1. The language chooser did not strip excess slashes correctly.
  2. The web server responded to internal requests from other "FQDNs", which caused the unwanted redirect.
  3. CloudFlare returned error 523 when attempting to access one of those URLs.

The program notes the first two issues require each other to do anything possibly unwanted or malicious. and the program notes they require each other to do anything possibly unwanted or malicious. The third is a CloudFlare-level behaviour, outside the program's control, and was not eligible for a bounty on its own.

Impact

The result is an open redirect: a link that starts on the trusted hackerone.com domain and ends on an attacker-chosen host. The program's wording is careful: the two issues "require each other to do anything possibly unwanted/malicious". The report itself does not describe any further consequence beyond the redirect to http://example.com.

Fix

The report does not state what was changed. The program's summary describes the two defects: the language chooser not stripping excess slashes correctly, and the web server responding to internal requests from other FQDNs.

Variants to test

These are follow-up ideas in the same spirit, for anyone hunting similar bugs:

  • Doubled slashes before a hostname on other paths that carry a language or locale switcher, for example //attacker.example/ru/faq. A positive result is the page loading normally and the switcher sending you to attacker.example.
  • The same pattern on other locale-prefixed paths (/ru/, and other language codes) to see whether the prefix changes how the path is parsed.
  • Other pages that render the same chooser, such as guidelines or help pages. A positive result is the same off-site redirect after changing language.
  • Backslash variants and mixed slash/backslash sequences in the same position, checking whether the chooser normalises them the same way.

Hunting notes

This kind of bug hides in features that build a redirect from the current URL: language switchers, locale pickers, "return to" links and canonicalisation redirects. During recon, look for pages whose URL contains a locale segment and which offer a language control; then try inserting a foreign hostname after a doubled slash and see whether the page still resolves. The signal that something is wrong is a page that loads despite an obviously foreign segment in its path. The researcher demonstrated impact simply and convincingly: a real page on the target domain, one click on the language chooser, and the browser landing on http://example.com.

Glossary

  • Bounty: a payment a company makes to a researcher who reports a valid security bug.
  • Browser: the program you use to visit websites, such as Firefox or Chrome.
  • CloudFlare: a service that sits in front of websites, forwarding visitors' requests and showing its own error pages when something fails.
  • Disclosure: making a bug report public, usually after it has been fixed.
  • Domain: the name of a website, such as hackerone.com.
  • Error 523: a CloudFlare error page shown when CloudFlare cannot reach the origin server behind it.
  • Exploit: the concrete steps that turn a bug into an observable effect.
  • FQDN: "fully qualified domain name", the complete name of a machine on the internet, such as example.com.
  • Host: the machine or site named in a URL, the part right after the scheme.
  • Language chooser (locale switcher): a control on a page that lets you pick the interface language and reloads the page in it.
  • Locale: a language and regional setting, often shown as a short code such as ru for Russian.
  • Normalisation: tidying up a URL into a standard form, for example collapsing repeated slashes, before using it.
  • Open redirect: a redirect whose destination can be chosen by whoever crafts the link.
  • Origin server: the real web server behind a service like CloudFlare.
  • Path: the part of a URL after the host that points at a page, made of slash-separated pieces.
  • Payload: the crafted input, here the URL, that triggers the bug.
  • Redirect: a website telling the browser to load a different address instead.
  • Recon: the exploratory phase of looking at a target to find interesting pages and features.
  • Root cause: the underlying defect that makes a bug possible.
  • Scheme: the first part of a URL, such as http or https, which says how to talk to the site.
  • URL: the address of a page or resource on the web.
  • Variant: a different but related version of the same bug, worth testing elsewhere.

More by Seif Elsallamy

View all

7 more disclosed reports, best first.

More from HackerOne

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Open redirect

The lesson behind this report.

A trusted site forwards users to any address an attacker picks; rarely paid alone, often the missing link in a chain.