Skip to content
Open redirect Write-up Beginner

How I found my Second bug in my bug bounty hunting journey

A branded short-link service used by a deep-linking platform accepted URL override parameters in the query string, letting anyone change the redirect destination. An attacker could craft a trusted-looking link that silently sent victims to a phishing page.

Altayeb Follow

Published on medium.com

Open Redirect

Altayeb, 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. 5 min read.

Context

This is a write-up of a second bug found during bug bounty hunting, on a target that used a branded short-link domain. The domain behaved like a typical deep-linking service: a short link opened the mobile app when it was installed, sent users to the App Store when it was not, and sent desktop visitors to a fallback web page. The short links appeared on the homepage, in the footer and in the "Get the App" buttons.

The bug is an open redirect caused by a deep-linking misconfiguration: the platform accepted URL override parameters in the query string, so anyone could change where a short link sent the user.

Setup

The report does not describe any accounts, roles, tool versions or special preconditions. The researcher started with subdomain enumeration, crawling the main site and checking for exposed APIs, then worked from a browser and from curl. The only thing needed to test the behaviour is a domain you control, or a request bin such as webhook.site, so you can confirm where the redirect lands.

Finding it

The initial reconnaissance (subdomain enumeration, crawling, API checks) produced nothing interesting. What stood out was the number of short links: on the homepage, in the footer and in the "Get the App" buttons. The domain looked like a branded short-link service of the kind that bridges web users into mobile apps.

Clicking one of the links led to a clean landing page with an app icon, a headline and a "Get The App" button. Opening the page source revealed, among the meta tags, the following strings:

Text
$fallback_url$desktop_url$android_url$ios_url

These are parameters used by the deep-linking platform to decide where to send users. If they control the redirect destination, the question is what happens when a visitor supplies their own value.

Exploitation

How the platform normally behaves

A typical short link looks like this:

Text
https://links.example.com/abc123

When the platform receives the request it checks which device the user is on (iOS, Android or desktop), whether the app is installed, and where the user should be sent. The destination is normally configured in the platform's dashboard. If URL overrides are enabled, an attacker can override that destination by adding a query parameter.

Step 1: Find short links

The report lists marketing landing pages, email campaigns, social media bios and app download buttons as places to look for short links. Common patterns are:

Text
https://links.example.com/xyzhttps://go.example.com/xyzhttps://app.example.com/xyz

Step 2: Test the override parameters

Append each parameter one at a time and observe the HTTP response:

Text
https://links.example.com/xyz?$fallback_url=https://your-test-domain.comhttps://links.example.com/xyz?$desktop_url=https://your-test-domain.com

Use a domain you control, or a request bin such as webhook.site, so you can confirm the redirect actually lands there. A crafted link of the form below makes the platform ignore the pre-configured safe destination and redirect to evil.com instead:

Text
https://links.example.com/abc123?$fallback_url=https://evil.com

Step 3: Test platform-specific overrides

Some parameters only trigger with a matching User-Agent. A desktop browser might ignore $android_url, but if an attacker spoofs a mobile User-Agent, or targets mobile users directly, the redirect still fires. Use curl with custom headers:

Text
curl -sIL -A "Mozilla/5.0 (Linux; Android 14; Pixel 8)" \  "https://links.example.com/xyz?$android_url=https://your-test-domain.com"curl -sIL -A "Mozilla/5.0 (iPhone; CPU iPhone OS 17 like Mac OS X)" \  "https://links.example.com/xyz?$ios_url=https://your-test-domain.com"

A positive result is a 302 Found or 307 Temporary Redirect pointing to your test domain.

Step 4: Try bypasses

If direct injection is blocked, test common bypasses:

Technique Payload
Protocol-relative URL //evil.com
Subdomain trick https://example.com.evil.com
URL parser confusion https://[redacted]
Encoding bypass URL encoding

The parameters to watch

Different platforms support different override parameters. The most common ones are:

Parameter Scope
$fallback_url Generic fallback for any unsupported scenario
$desktop_url Desktop browsers
$android_url Android devices
$ios_url iOS devices
$ipad_url iPad specifically

Root cause

The destination of a short link is configured in the deep-linking platform's dashboard, but the platform also accepts URL override parameters in the query string. When the dashboard is not locked down, anyone can append a parameter such as $fallback_url to the link and change where it sends the user. The platform sees the parameter, ignores the pre-configured safe destination and redirects to the supplied URL. The report does not describe any server-side validation that was present and bypassed.

Impact

The redirect is dangerous because of the trust in the domain. The user sees links.example.com, a subdomain they associate with a brand they trust, and has no reason to suspect the link is malicious. The redirect happens server-side (HTTP 302/307), so the user does not see the final destination until the browser has already navigated there, and there is no visual warning.

This makes it suitable for phishing. An attacker can send an email such as "Your account needs verification. Click here.", include the manipulated short link, redirect to a cloned login page, capture credentials and optionally redirect back to the real site so the victim never notices.

Fix

The report gives three remediation steps:

  1. Disable URL override.
  2. Use a strict allowlist. If overrides are needed for specific campaigns, only permit redirects to domains you own:
Text
*.example.com*.example.iohttps://apps.apple.com/...https://play.google.com/...
  1. Audit existing links.

It notes that the fix is usually a single toggle in a dashboard, while leaving it enabled can lead to thousands of compromised accounts.

Variants to test

  • Append $fallback_url, $desktop_url, $android_url, $ios_url and $ipad_url one at a time to a short link and watch for a 302 or 307 to your test domain.
  • Repeat the same parameters with a spoofed mobile User-Agent, since some overrides only fire for matching devices.
  • If direct injection is rejected, try //evil.com, https://example.com.evil.com, https://[redacted] and URL-encoded variants.
  • Look for short-link domains in marketing pages, email campaigns, social media bios and app download buttons, and check the page source of the landing page for override parameter names.

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

What happened, in plain words

A security researcher was hunting for bugs. This was the second bug of that journey. This was the second bug of that journey. The bug was on a short-link domain: a web address that looks like links.example.com/abc123, short and tidy, the kind a company uses so that a long ugly link fits in a text message or a poster.

That short link did something clever. If you opened it on a phone with the company's app installed, it opened the app. If you opened it on a phone without the app, it sent you to the App Store. If you opened it on a laptop, it sent you to an ordinary web page. Services that do this are called deep-linking platforms, and they exist to bridge the gap between the web and mobile apps.

The problem was that the service also accepted instructions in the link itself about where to send the visitor. Anyone could add a small piece to the end of the link and change the destination. So a link on the company's own trusted domain could quietly send you to a website the attacker chose. That is called an open redirect.

Why does that matter? Because people trust a domain they recognise. If the address bar says the company's short-link domain, most people will click without a second thought. The redirect then happens behind the scenes, and the visitor lands on a fake login page that looks real. That is a phishing setup, and it is much more convincing when the first link is genuine.

This article walks through how the researcher found it, how you can test the same thing yourself with nothing more than a browser, and how the problem should be fixed.

The starting point

Before finding this bug, the researcher did the usual first pass over the target:

  1. Subdomain enumeration. A subdomain is a part of a domain, like shop.example.com or links.example.com when the main site is example.com. Companies often have many, and some are forgotten or less protected. Enumerating them means making a list of as many as you can find.
  2. Crawling the main site. Crawling means visiting pages and following links, the way a search engine does, to map out what exists.
  3. Checking for exposed APIs. An API is a way for one piece of software to talk to another, like a waiter taking your order to the kitchen. Websites use APIs constantly, and sometimes one is left reachable that should not be.

None of that produced anything interesting. What did stand out was the number of short links. They were on the homepage, in the footer and in the "Get the App" buttons. The domain looked like a branded short-link service, the kind that bridges web users into mobile apps.

It is easy to skip over links like this. They look like marketing material, not security material. The lesson of this bug is that boring-looking things deserve curiosity.

Finding it

The researcher clicked one of the short links. It led to a clean landing page with an app icon, a headline and a "Get The App" button. Nothing unusual on the surface.

Then came the step that mattered: opening the page source. Every browser can show you the raw HTML that makes up a page, the instructions the browser used to draw what you see. In the source, among the meta tags, the researcher found these strings:

Text
$fallback_url$desktop_url$android_url$ios_url

Line by line, in plain words:

  • $fallback_url is a name that suggests a backup destination, used when the service cannot work out anything better.
  • $desktop_url suggests a destination for desktop computers.
  • $android_url suggests a destination for Android phones.
  • $ios_url suggests a destination for iPhones.

These are not random text. They are parameter names. A parameter is a labelled slot you can fill in, like the fields on a form. Here the slots are used by the deep-linking platform to decide where to send each visitor.

That raised the obvious question: if these slots control the destination, what happens if a visitor fills in their own value?

What the vulnerability is

Mobile apps use deep-linking platforms, such as Branch.io, Firebase Dynamic Links or similar services, to bridge web and mobile. These platforms generate short links that:

  • open the app if it is installed;
  • redirect to the App Store if it is not;
  • send desktop users to a fallback web page.

The problem is that some of these platforms allow URL override parameters in the query string. The query string is the part of a web address after a question mark, where extra information is passed along, like a note attached to an envelope. An override parameter is a note that says "ignore the usual destination, use this one instead".

If the platform's dashboard is not locked down, anyone can append such a parameter to the link and change where it sends the user. The dashboard is the control panel where the company configures its links.

How it works

A typical short link looks like this:

Text
https://links.example.com/abc123

In plain words:

  • https:// is the protocol, the set of rules for fetching a web page securely.
  • links.example.com is the domain, the name of the server being contacted.
  • /abc123 is the path, the specific item being asked for, here a particular short link.

When the platform receives this request, it checks three things:

  1. What device is the user on? iOS, Android or desktop.
  2. Is the app installed?
  3. Where should we send them?

The destination is normally configured in the platform's dashboard. But if URL overrides are enabled, an attacker can override that destination by adding a query parameter.

Here is what an attacker crafts:

Text
https://links.example.com/abc123?$fallback_url=https://evil.com

Line by line:

  • https://links.example.com/abc123 is the genuine short link, unchanged.
  • ? starts the query string, the part where extra instructions go.
  • $fallback_url= names the parameter being set.
  • https://evil.com is the value being given to it, a site the attacker controls.

The platform sees $fallback_url, ignores the pre-configured safe destination, and redirects the user to evil.com instead.

The parameters to watch

Different platforms support different override parameters. The most common ones are:

Parameter What it targets
$fallback_url Generic fallback for any unsupported scenario
$desktop_url Desktop browsers
$android_url Android devices
$ios_url iOS devices
$ipad_url iPad specifically

One important detail: some of these only trigger on specific User-Agents. A User-Agent is a short line of text your browser sends with every request to say what it is, a bit like stating your name and device at a reception desk. A desktop browser might ignore $android_url, but if an attacker spoofs a mobile User-Agent, or targets mobile users directly, the redirect still fires. Spoofing means pretending to be something you are not.

Why this is dangerous

1. Domain trust

The user sees links.example.com, a subdomain they associate with a brand they trust. They have no reason to suspect the link is malicious.

2. The redirect is invisible

The redirect happens server-side, meaning on the server rather than in the browser, using HTTP status codes 302 or 307. A status code is a short number a server sends back to say what happened. 302 and 307 both mean "the thing you asked for is somewhere else, go there instead". The user does not see the final destination until the browser has already navigated there. There is no visual warning.

3. Perfect for phishing

Phishing is tricking someone into handing over information, usually a password, by pretending to be someone they trust. An attacker can:

  • send an email such as "Your account needs verification. Click here.";
  • include the manipulated short link;
  • redirect to a cloned login page;
  • capture credentials;
  • optionally redirect back to the real site so the victim never notices.

Credentials here means the username and password someone types in.

The methodology

If you are testing a target that uses a deep-linking platform, here is how to verify the misconfiguration. Each step is explained with the reason behind it.

Step 1: Find short links

Look for links on:

  • marketing landing pages;
  • email campaigns;
  • social media bios;
  • app download buttons.

Common patterns are:

Text
https://links.example.com/xyzhttps://go.example.com/xyzhttps://app.example.com/xyz

In plain words, this block lists three example shapes of short-link addresses:

  • https://links.example.com/xyz uses a domain starting with links.
  • https://go.example.com/xyz uses one starting with go.
  • https://app.example.com/xyz uses one starting with app.

The report gives these three example shapes of short-link addresses. The reason to look in all those places is simple: a short link only exists where someone published it, so you collect candidates first and test them afterwards.

Step 2: Test the override parameters

Append each parameter one at a time and observe the HTTP response:

Text
https://links.example.com/xyz?$fallback_url=https://your-test-domain.comhttps://links.example.com/xyz?$desktop_url=https://your-test-domain.com

Line by line:

  • The first address takes the short link https://links.example.com/xyz and adds ?$fallback_url=https://your-test-domain.com, asking the platform to send visitors to a domain you control.
  • The second does the same with $desktop_url, which targets desktop browsers.

Testing one parameter at a time matters because if you add several and something happens, you will not know which one caused it. Changing one thing at a time is the basic rule of any experiment.

Use a domain you control, or a request bin such as webhook.site, so you can confirm the redirect actually lands there. A request bin is a service that gives you a web address and records every visit to it, like a clipboard by the door. If your bin records a visit, you know the redirect really happened and was not just a page that looked similar.

Step 3: Test platform-specific overrides

Some parameters only work with matching User-Agents. Use curl with custom headers:

Text
curl -sIL -A "Mozilla/5.0 (Linux; Android 14; Pixel 8)" \  "https://links.example.com/xyz?$android_url=https://your-test-domain.com"curl -sIL -A "Mozilla/5.0 (iPhone; CPU iPhone OS 17 like Mac OS X)" \  "https://links.example.com/xyz?$ios_url=https://your-test-domain.com"

Line by line:

  • curl is a small command-line program for fetching web addresses. It is useful because it lets you set exactly what you send, which a normal browser will not let you do easily.
  • -s means silent: do not print progress noise.
  • -I means ask only for the headers, the short summary a server sends before the page content, which is where the redirect status appears.
  • -L means follow redirects, so you can see where the chain ends.
  • -A "Mozilla/5.0 (Linux; Android 14; Pixel 8)" sets the User-Agent to look like an Android phone.
  • The backslash \ at the end of a line means the command continues on the next line, purely for readability.
  • The quoted address is the short link with $android_url set to your test domain.
  • The second command repeats the same idea with an iPhone User-Agent and $ios_url.

A positive result is a 302 Found or 307 Temporary Redirect pointing to your test domain. In other words, the server answered "go somewhere else" and named your domain as the somewhere else.

Step 4: Try bypasses

If direct injection is blocked, test common bypasses. Injection here means putting your own value into the parameter. A bypass is a way around a check that is meant to stop you.

Technique Payload
Protocol-relative URL //evil.com
Subdomain trick https://example.com.evil.com
URL parser confusion https://[redacted]
Encoding bypass URL encoding

What each one is doing:

  • Protocol-relative URL. //evil.com leaves out https: and lets the browser fill it in. Some checks look for the literal text https:// and miss this form.
  • Subdomain trick. https://example.com.evil.com starts with a trusted-looking name but the real domain, the part that decides where you go, is evil.com. Reading a domain means reading from the right, not the left.
  • URL parser confusion. https://[redacted] uses the @ sign. In a web address, everything before @ can be a username, and the actual destination is what comes after. A check that only looks at the start of the string can be fooled.
  • Encoding bypass. URL encoding means writing characters in a coded form, for example a space as %20. The server decodes it back before use, so a check that inspects the coded text may not recognise what it becomes.

Root cause

The destination of a short link is configured in the deep-linking platform's dashboard, but the platform also accepts URL override parameters in the query string. When the dashboard is not locked down, anyone can append a parameter such as $fallback_url to the link and change where it sends the user. The platform sees the parameter, ignores the pre-configured safe destination and redirects to the supplied URL.

In everyday terms: if the platform allows the destination to be changed from the link, and that is not locked down, anyone can redirect visitors. The report does not describe any server-side validation that was present and bypassed; the override appears to be a feature that was left enabled.

Impact

The redirect is dangerous because of the trust in the domain. The user sees links.example.com, a subdomain they associate with a brand they trust, and has no reason to suspect the link is malicious. The redirect happens server-side, with HTTP 302 or 307, so the user does not see the final destination until the browser has already navigated there, and there is no visual warning.

This makes it suitable for phishing. An attacker can send an email such as "Your account needs verification. Click here.", include the manipulated short link, redirect to a cloned login page, capture credentials and optionally redirect back to the real site so the victim never notices. The report does not state which target was affected or how many users were exposed.

Fix

The report gives three remediation steps:

  1. Disable URL override.
  2. Use a strict allowlist. If overrides are needed for specific campaigns, only permit redirects to domains you own:
Text
*.example.com*.example.iohttps://apps.apple.com/...https://play.google.com/...

Line by line:

  • *.example.com means any subdomain of example.com. The * is a wildcard, a stand-in for "anything".
  • *.example.io does the same for a second domain the company owns.
  • https://apps.apple.com/... allows the Apple app store address.
  • https://play.google.com/... allows the Google Play address.

An allowlist is a list of things that are permitted, with everything else refused. It is the opposite of a blocklist, which lists what is forbidden. Allowlists are safer because you only have to think of what you want to allow, not every bad thing that might exist.

  1. Audit existing links. Auditing means going through what is already out there and checking it, because links published months ago are still in emails and posts.

It notes that the fix is usually a single toggle in a dashboard, while leaving it enabled can lead to thousands of compromised accounts.

Variants to test

  • Append $fallback_url, $desktop_url, $android_url, $ios_url and $ipad_url one at a time to a short link and watch for a 302 or 307 to your test domain.
  • Repeat the same parameters with a spoofed mobile User-Agent, since some overrides only fire for matching devices.
  • If direct injection is rejected, try //evil.com, https://example.com.evil.com, https://[redacted] and URL-encoded variants.
  • Look for short-link domains in marketing pages, email campaigns, social media bios and app download buttons, and check the page source of the landing page for override parameter names.

Glossary

  • API: a way for one piece of software to talk to another, like a waiter carrying orders between you and the kitchen.
  • Allowlist: a list of things that are permitted, with everything else refused.
  • Audit: going through something that already exists and checking it.
  • Bypass: a way around a check that is meant to stop you.
  • Crawl: visiting pages and following links automatically, the way a search engine maps a site.
  • Credentials: the username and password someone types in to log in.
  • curl: a command-line program for fetching web addresses, which lets you set exactly what you send.
  • Dashboard: the control panel where a company configures a service.
  • Deep-linking platform: a service that makes a link open a mobile app if installed, or send the visitor somewhere else if not.
  • Domain: the name of a server on the web, such as example.com.
  • Encoding (URL encoding): writing characters in a coded form, such as %20 for a space, which the server decodes before use.
  • HTTP status code: a short number a server sends back to say what happened, such as 302 or 307 for a redirect.
  • Injection: putting your own value into a place the system did not expect it.
  • Meta tags: lines in a page's HTML that describe the page to browsers and services.
  • Open redirect: a link on a trusted site that will send visitors to any address someone supplies.
  • Override parameter: a setting in a web address that says "ignore the usual destination, use this one instead".
  • Parameter: a labelled slot you can fill in, like a field on a form.
  • Path: the part of a web address after the domain, naming the specific item asked for.
  • Phishing: tricking someone into handing over information, usually a password, by pretending to be someone they trust.
  • Protocol: the set of rules for fetching a web page, such as https.
  • Protocol-relative URL: an address starting with // that leaves out https: and lets the browser fill it in.
  • Query string: the part of a web address after a question mark, carrying extra information.
  • Redirect: a server telling the browser to go to a different address instead.
  • Request bin: a service that gives you a web address and records every visit to it.
  • Server-side: happening on the server rather than in the browser.
  • Short link: a short, tidy web address that stands in for a longer one.
  • Spoofing: pretending to be something you are not, such as a different device.
  • Subdomain: a part of a domain, such as links in links.example.com.
  • Subdomain enumeration: making a list of as many subdomains of a target as you can find.
  • User-Agent: a short line of text a browser sends with every request to say what it is.
  • Wildcard: a symbol, usually *, that stands for "anything".

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.