Skip to content
Open redirect Write-up Beginner

My First Bug, Open redirect at Epic Games → $500 Bounty

An open redirect existed on an Epic Games login page because the redirectUrl parameter accepted a value with four leading slashes, which bypassed the intended validation. An attacker could craft a link that sends a victim to an arbitrary external site after login.

Professor the Hunter Follow

Published on medium.com

Bounty$500 View original

Security Researcher at HackerOne. In 2022, I was in 60th place worldwide as per HackerOne leaderboard.

Professor the Hunter, on medium.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

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. 4 min read.

Context

Epic Games runs a login page on a web domain that accepts a redirectUrl parameter, so that after authentication the user can be sent back to a destination such as the store. The parameter carries the destination to return to after login, shown in the report as the Epic Games store. The report shows the login endpoint with a lang parameter, a noHostRedirect flag and the redirectUrl parameter, and demonstrates that a crafted value sends the browser to an arbitrary external host.

The researcher classifies the issue as an open redirect, while noting that the endpoint was not directly vulnerable in the obvious way: the working value relied on a bypass rather than a plain external URL.

Setup

The researcher had no special role or tooling described. The work was practice on real websites rather than on a deliberately vulnerable machine, which the author says did not satisfy them. The starting point was an existing open redirect link taken from HackerOne that pointed at an Epic Games domain; the author then practised open redirect bypass techniques against it. No accounts, versions or proxy tools are mentioned.

Finding it

After learning what an open redirect is and how it works, the researcher needed a live open redirect link to practise on and picked one from HackerOne belonging to an Epic Games domain. Instead, the bypass worked, which the author describes as astonishing.

Many payloads were tried. Only one form worked: four backslashes placed before the host link.

Text
&redirectUrl=////evil.com

Exploitation

Step 1: confirm the legitimate behaviour

The baseline is a login URL whose redirectUrl points at an Epic Games store host, URL-encoded inside the query string:

Text
https://www.redacted.com/id/login?lang=en-US&noHostRedirect=true&redirectUrl=https%3A%2F%2Fstore.redacted.com%2F

Here redirectUrl carries an absolute https URL to the store, encoded so that its own : and / characters do not interfere with the query string. This is the intended use of the parameter: after login, the user lands on the store.

Step 2: substitute the bypass value

The same endpoint is then requested with the redirectUrl value replaced by four slashes followed by an attacker-controlled host:

Text
https://www.redacted.com/id/login?lang=en-US&noHostRedirect=true&redirectUrl=////evil.com

The value ////evil.com is not an absolute URL with a scheme. It begins with four forward slashes, and the rest is the external host. According to the report, this is the only payload shape that worked; other payloads tried did not. The report presents this value as the open redirect, sending the browser to evil.com instead of an Epic Games host.

Root cause

The report does not describe the server-side validation code, so the exact mistake is not shown. What can be said from the behaviour is that the check on redirectUrl accepted a value beginning with //// and treated it as a permitted destination, and that the browser was then sent to an external host.. Why the four-slash form passed while other payloads did not is not explained in the report; The report does not explain why the four-slash form passed while other payloads did not.

Impact

The author frames it as a bypass of the intended redirect restriction rather than a plain open redirect.

Fix

A fix would be to validate redirectUrl against an allowlist of permitted hosts after normalising the value, rejecting any input that does not resolve to an allowed destination, rather than relying on a prefix check that leading slashes can satisfy.

Variants to test

  1. Try slash-based prefixes on any redirectUrl-style parameter: //evil.com, ///evil.com, ////evil.com, and backslash forms. A positive result is a Location header or client-side navigation to the external host.
  2. Try the same values URL-encoded (%2F%2Fevil.com) and mixed with a scheme (https://evil.com, https:%2F%2Fevil.com). A positive result is the browser leaving the trusted domain.
  3. Try appending an allowed host before the external one, for example https://[redacted] or https://store.redacted.com.evil.com. A positive result is that the browser's address bar shows the external host.
  4. Test the noHostRedirect flag alongside the redirect parameter, since the report shows it present in both the valid and the malicious URL. A positive result is that toggling the flag changes whether the redirect is followed.
  5. Repeat with different lang values and other query parameters to see whether validation depends on the surrounding parameters. A positive result is that the bypass works only in certain combinations, which points at where the check sits.

Closing

The author notes this was a first bug and closes with thanks, inviting readers to reach out on Twitter, Facebook or elsewhere under the handle @bughuntar.

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store From the original on medium.com
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

The two images are the Medium app download buttons shown at the end of the post, one for the App Store and one for Google Play.

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. 9 min read.

What happened, in plain words

A security researcher found a way to make a login page on an Epic Games website send visitors to a different website of the researcher's choosing. This kind of flaw is called an open redirect. The login page had a setting that was supposed to say "after you log in, take the user back to this page on our own site". By putting a specially crafted value into that setting, the researcher made the page send the browser to evil.com instead.

The trick was not the obvious one. What worked was a value beginning with four forward slashes, ////evil.com. The researcher tried many variations and only this shape got through. The report calls it a bypass of the redirect restriction rather than a plain open redirect.

The researcher describes it as their first bug. The write-up is short: it shows the normal login link, the malicious login link, and the payload. It does not show the server code, so the exact programming mistake is not visible.

Who wrote it and how they got started

The author is a security researcher who works through HackerOne, a platform where companies publish bug bounty programmes and researchers submit findings. In 2022 the author says they were in 60th place worldwide on the HackerOne leaderboard, which ranks researchers by reputation points. They invite readers to follow them on Twitter under the handle @bughuntar.

They heard about bug bounty hunting in January 2022 and started learning. Practising on a deliberately vulnerable machine, a computer set up on purpose with known flaws so beginners can attack it safely, did not satisfy them. So they moved to practising on real websites. During that practice they found this issue at Epic Games, and they say they logically started bug bounty work in April 2022.

What the bug is

An open redirect is a feature that is meant to forward a visitor from one page to another, but which accepts any destination, including one controlled by an attacker. A simple comparison: a receptionist who is told "send this visitor to room 12" but who will also happily send them to any address a stranger writes on a note. The feature itself is normal and useful; the problem is that nobody checks the destination.

Why does that matter? Because the link the victim clicks starts on a trusted domain. A phishing page, a fake login form that steals passwords, is much more convincing when the journey begins at a real company's address and only later bounces to the attacker's site.

The author is careful about the classification. The endpoint was not directly vulnerable in the obvious way. When they learned what an open redirect is and how it works, they needed a live open redirect link to practise bypass techniques on. They picked one from HackerOne that pointed at an Epic Games domain. They expected it to reject outside destinations. It did not, and the author says they were astonished when it worked.

The payload that worked

Many payloads were tried. Only one form worked: four backslashes, as the author describes them, placed before the host link. In the code it is four forward slashes.

Text
&redirectUrl=////evil.com

Line by line, in plain words:

  • & is the character that separates one setting from the next in a web address. This snippet is a fragment meant to be added to a longer address, not a complete URL on its own.
  • redirectUrl is the name of the setting, the parameter, that tells the login page where to send the user afterwards. The name is written in the address itself, so anyone can see it and change its value.
  • = separates the name of the setting from its value.
  • ////evil.com is the value. It is not a full web address with https:// in front. It starts with four forward slashes and ends with an outside host name, evil.com, which stands for any site an attacker controls.

Why four slashes? A browser reading a value that starts with // treats it as "same kind of connection as this page, but a different host". That is called a protocol-relative reference. The extra slashes are absorbed when the browser works out the address, so the browser ends up at evil.com. The report does not explain why four slashes passed the site's check while other payloads did not; it only records that this was the one that worked.

Step 1: see what normal behaviour looks like

Before changing anything, the author looked at a legitimate login link. This is the baseline: what the page is supposed to do.

Text
https://www.redacted.com/id/login?lang=en-US&noHostRedirect=true&redirectUrl=https%3A%2F%2Fstore.redacted.com%2F

Line by line, in plain words:

  • https://www.redacted.com/id/login is the address of the login page. https is the encrypted version of the web's transfer protocol, the one used for anything sensitive such as logging in.
  • ? marks the start of the query string, the part of a web address that carries settings. Everything after it is a list of name and value pairs.
  • lang=en-US sets the language to US English. It is one setting, separated from the next by &.
  • noHostRedirect=true is a flag, a setting that is either on or off. The name suggests it controls whether the page is allowed to redirect to a different host. The report shows it present in both the normal and the malicious link but does not say what it does.
  • redirectUrl=https%3A%2F%2Fstore.redacted.com%2F is the destination setting. Its value is a full web address to the Epic Games store, but written in URL encoding: %3A stands for the colon : and %2F stands for the slash /. Encoding is needed because those characters have their own meaning inside a web address, and encoding them stops the browser from misreading where one setting ends and the next begins.

This is the intended use: after you log in, you land on the store. The author needed this baseline to know what a correct value looks like before trying to break it.

Step 2: swap in the bypass value

The same login page is then requested with the destination replaced by four slashes and an outside host:

Text
https://www.redacted.com/id/login?lang=en-US&noHostRedirect=true&redirectUrl=////evil.com

Line by line, in plain words:

  • Everything up to redirectUrl= is identical to the normal link: same login page, same language, same flag. Only the destination changes, which isolates the one thing being tested.
  • ////evil.com is the crafted value. It has no https:// and no encoding. It begins with four forward slashes, and the rest is the outside host.

According to the report, this is the only payload shape that worked; the other payloads the author tried did not. The report presents this value as the open redirect, sending the browser to evil.com instead of to an Epic Games host. The author calls this a bypass because the page was evidently trying to restrict destinations and this value slipped past that restriction.

Why it probably worked

What can be said from the behaviour is that the check on redirectUrl accepted a value beginning with //// and treated it as a permitted destination, and that the browser then resolved it as a protocol-relative reference to an outside host.

A likely explanation, which the report does not confirm, is that the check looked only at the start of the string. The value was then not normalised, meaning not cleaned up and resolved into its final form, before the redirect was issued. Why the four-slash form passed while other payloads did not is not explained in the report.

What the impact is

A link on the Epic Games login domain can send a victim to an attacker-controlled site after the login flow.

How it would be fixed

A fix would be to check redirectUrl against an allowlist, a list of permitted hosts, after normalising the value, and to reject anything that does not resolve to an allowed destination. Relying on a prefix check, looking only at the first characters, is what leading slashes can satisfy.

Other variations worth trying

These are general testing ideas for a parameter like redirectUrl, not things the report says were tried:

  1. Try slash-based prefixes on any redirect-style parameter: //evil.com, ///evil.com, ////evil.com, and backslash forms. A positive result is a Location header, the response header that tells the browser where to go next, or a client-side navigation to the outside host.
  2. Try the same values URL-encoded (%2F%2Fevil.com) and mixed with a scheme (https://evil.com, https:%2F%2Fevil.com). A positive result is the browser leaving the trusted domain.
  3. Try putting an allowed host before the outside one, for example https://[redacted] or https://store.redacted.com.evil.com. A positive result is that the browser's address bar shows the outside host.
  4. Test the noHostRedirect flag alongside the redirect parameter, since the report shows it present in both the valid and the malicious link. A positive result is that toggling the flag changes whether the redirect is followed.
  5. Repeat with different lang values and other query parameters to see whether validation depends on the surrounding parameters. A positive result is that the bypass works only in certain combinations, which points at where the check sits.

Closing

The author notes this was a first bug and closes with thanks, inviting readers to reach out on Twitter, Facebook or elsewhere under the handle @bughuntar.

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store From the original on medium.com
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

The two images are the Medium app download buttons shown at the end of the post, one for the App Store and one for Google Play.

Glossary

  • Bug bounty: a programme in which a company pays researchers for reporting security flaws in its systems.
  • HackerOne: a platform where companies publish bug bounty programmes and researchers submit and track findings.
  • Leaderboard: a ranking of researchers on HackerOne by reputation points earned from accepted reports.
  • Open redirect: a feature that forwards a visitor to another page but accepts any destination, including one chosen by an attacker.
  • Bypass: getting past a security check that is meant to stop you, without removing it.
  • Payload: the crafted value or input sent to a system to test or exploit it.
  • Parameter: a named setting carried in a web address, such as redirectUrl, whose value the visitor can change.
  • Query string: the part of a web address after the ?, holding settings as name and value pairs separated by &.
  • Flag: a setting that is either on or off, such as noHostRedirect=true.
  • URL encoding: writing characters such as : and / as codes like %3A and %2F so they do not confuse the parser.
  • HTTPS: the encrypted version of the web's transfer protocol, used for sensitive pages such as logins.
  • Protocol-relative reference: a link starting with // that keeps the current page's connection type but points at a different host.
  • Host: the part of a web address that names the server, such as evil.com.
  • Normalisation: cleaning up and resolving a value into its final, standard form before checking or using it.
  • Allowlist: a list of values that are explicitly permitted, with everything else rejected.
  • Prefix check: a validation that looks only at the first characters of a value, which can be fooled by extra leading characters.
  • Location header: the response header a server sends to tell the browser to go to another address.
  • Phishing: tricking someone into entering details on a fake site that imitates a trusted one.
  • Vulnerable machine: a computer set up on purpose with known flaws so people can practise attacking it safely.

More by Professor the Hunter

View all

1 more disclosed report, best first.

More from Epic Games

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.