Skip to content
Open redirect Write-up Intermediate

How I find open redirect in Facebook

Abhinav Kumar Follow

Published on medium.com

Bounty$500 View original

This is my first write up and I am going to share with you how I found an open redirect in l.facebook.com. So without wasting any time let’s get started.

Abhinav Kumar, 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

Facebook's link shim lives at l.facebook.com. When a user clicks a link that passes through Facebook, the platform wraps it in a redirect endpoint so it can check the destination against its Linkshim system, which is meant to block known malicious sites. The endpoint takes the destination in the u parameter:

The researcher's story starts with a link a friend sent, warning that opening it would get him hacked. The link went through l.facebook.com and landed on Instagram. That is expected behaviour: the shim allows redirection to sites that are not on its malicious list. The question the researcher asked was whether the destination could be swapped for an arbitrary one.

Setup

The tools involved were a proxy and Burp Suite, installed against the Brave browser. The key precondition is that the browser under test is Brave; the researcher only realised this partway through. No accounts or special roles are described.

Finding it

The researcher replaced the Instagram URL in the u parameter with evil.com and the redirect still worked. That alone was not treated as a bug by Facebook: the team reviewed the report in under a minute, marked it invalid, and explained that the endpoint is designed for redirection and is protected by the Linkshim system. They added the condition that would make a report valid: redirecting to a site that Linkshim blocks. They supplied a test domain created for exactly this purpose:

HTTP
https://test.facebook-whitehat.com

The researcher then requested:

HTTP
https://l.facebook.com/l.php?u=https://test.facebook-whitehat.com

and the redirect succeeded. Facebook replied that they could not reproduce it and asked for a proof-of-concept video, which the researcher provided. The team's answer was that there was no problem on their side and that it was a client-side issue. At that point the researcher realised he was using Brave, and that the behaviour came from the browser rather than from Facebook.

Exploitation

Step 1: confirm the redirect through the shim

Request the shim with the blocked test domain as the destination:

HTTP
https://l.facebook.com/l.php?u=https://test.facebook-whitehat.com

The u parameter carries the destination. The researcher reported that the redirect succeeded, though Facebook could not reproduce it on their side.

Step 2: observe the traffic in the proxy

With a proxy configured in Brave and Burp Suite running, the researcher requested the same URL again:

HTTP
https://l.facebook.com/l.php?u=https://test.facebook-whitehat.com

In the proxy he saw that the browser requested https://test.facebook-whitehat.com directly and never requested l.facebook.com for validation. The browser requested the destination directly and did not request l.facebook.com for validation.

Step 3: report to the browser vendor

The researcher reported the behaviour to Brave. The report was accepted within a day, and the team attributed it to a browser feature called URL Debouncing. The issue was filed in the medium category and later upgraded to high by the team. The researcher's follow-up research found that the behaviour produced an open redirect on major sites including Facebook, Amazon, YouTube and Reddit.

Root cause

The flaw is in the browser, not in the server-side shim. Brave attributed the behaviour to a browser feature called URL Debouncing. The report does not describe how it works. Because the intermediary is never contacted, its server-side validation (Linkshim) is bypassed. Facebook's defence was working as designed; it simply never got the chance to run. The report does not describe the implementation of URL Debouncing beyond naming it.

Impact

The result is an open redirect on sites that rely on a redirect endpoint for link validation, with Facebook, Amazon, YouTube and Reddit named by the researcher. The researcher found that the behaviour produced an open redirect on major sites including Facebook, Amazon, YouTube and Reddit. The condition is that the victim uses a browser exhibiting the debouncing behaviour.

Fix

The report was accepted by Brave within a day and attributed to URL Debouncing. On the server side, nothing needed changing, since the shim and Linkshim behaved correctly when they were actually reached.

Variants to test

  1. Take any site that wraps outbound links in a redirect endpoint with a destination parameter, and request the endpoint with a destination the site blocks. A positive result is a redirect to the blocked destination when the request is made through a browser with debouncing behaviour, while the same URL through a proxy shows the browser skipping the intermediary.
  2. Compare proxied and unproxied traffic for the same redirect URL. A positive result is the proxy log showing a direct request to the final host and no request to the redirect endpoint.
  3. Repeat with several browsers and versions to see which ones skip the intermediary. A positive result is one browser bypassing the check while others follow the redirect chain.
  4. Test redirect endpoints on other large platforms named in the report (Amazon, YouTube, Reddit) with a destination their link filters reject. A positive result is the browser reaching the rejected destination without the filter being consulted.

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

What happened, in plain words

A security researcher found a way to make links on Facebook, Amazon, YouTube, Reddit and other big sites send people to any website the attacker chose, even websites those companies were trying to block. The surprising part is that the mistake was not in those websites at all. It was in a web browser called Brave. Brave had a feature that was supposed to make browsing faster, and that feature accidentally skipped a safety check that Facebook and others rely on. Brave accepted the report, paid a $500 bounty plus some swag, and rated the issue High severity.

This article walks through the whole story from the beginning, explaining every term as it comes up, so you can follow it even if you have never done security work before.

Background: what a link shim is

When you click a link on Facebook, the link you see is often not the link your browser actually visits first. Facebook wraps the destination inside its own address, so the click goes to Facebook first, Facebook inspects where you are trying to go, and then Facebook sends your browser onward. This middle step is called a link shim (sometimes written "linkshim").

Think of it like a receptionist at an office building. Visitors do not walk straight to any floor; they check in at the front desk, the receptionist looks at a list of banned visitors, and only then are they allowed up. The front desk is the shim. The banned list is Facebook's blocklist of known malicious sites.

Facebook's shim lives at a web address starting with l.facebook.com. The endpoint (the specific path on that server that handles the request) takes the destination inside a parameter called u. A parameter is the part of a URL after a question mark that carries extra information, like ?u=... meaning "the destination is whatever follows".

The endpoint looks like this:

Line by line:

  • https:// means a secure (encrypted) web connection.
  • l.facebook.com is Facebook's link shim server.
  • /l.php is the specific page or script on that server that handles the redirect.
  • ?u= starts the parameter named u, which holds the destination.
  • <destination> is a placeholder for wherever the user is being sent.

The story begins

One evening a friend sent the researcher a Facebook link with a warning: do not open it, or you will get hacked. The researcher opened it anyway. The link went through l.facebook.com and landed on Instagram. That is normal: the shim allows redirects to sites that are not on its malicious list. Instagram is not on the list, so the redirect went through.

The researcher then asked a simple question: what if I swap the destination for something else? That question is the seed of the whole bug.

Setup: the tools used

The researcher used two tools:

  1. A proxy: software that sits between your browser and the internet and records every request and response. Think of it as a mailroom that opens and logs every letter before passing it on.
  2. Burp Suite: a popular security testing tool that includes a proxy and lets you inspect and modify web traffic.

These were installed against the Brave browser. Brave is a web browser built on the same underlying engine as Chrome, with extra privacy features. The researcher only realised partway through the story that Brave was the key ingredient. No accounts or special roles are described.

Finding it

The researcher replaced the Instagram URL inside the u parameter with evil.com and the redirect still worked. In other words, the shim happily sent the browser to evil.com.

That alone was not treated as a bug by Facebook. The team reviewed the report in under a minute, marked it invalid, and explained that the endpoint is designed for redirection and is protected by the Linkshim system. They added the condition that would make a report valid: redirecting to a site that Linkshim actually blocks. They supplied a test domain created for exactly this purpose:

HTTP
https://test.facebook-whitehat.com

Line by line:

  • https:// is the secure web protocol.
  • test.facebook-whitehat.com is a domain name that Facebook set up specifically so researchers can test whether the blocklist is being enforced. If a redirect to this domain succeeds, the blocklist was bypassed.

The researcher then requested:

HTTP
https://l.facebook.com/l.php?u=https://test.facebook-whitehat.com

Line by line:

  • https://l.facebook.com/l.php is the shim endpoint.
  • ?u= starts the destination parameter.
  • https://test.facebook-whitehat.com is the blocked test domain being used as the destination.

And the redirect succeeded. Facebook replied that they could not reproduce it and asked for a proof-of-concept video (a short recording showing the bug happening step by step), which the researcher provided. The team's answer was that there was no problem on their side and that it was a client-side issue. "Client-side" means the problem is in the software running on the user's own computer (the browser), not in the server that Facebook controls.

At that point the researcher realised he was using Brave, and that the behaviour came from the browser rather than from Facebook.

Exploitation

Step 1: confirm the redirect through the shim

Request the shim with the blocked test domain as the destination:

HTTP
https://l.facebook.com/l.php?u=https://test.facebook-whitehat.com

Line by line:

  • The browser asks Facebook's shim to send it to test.facebook-whitehat.com.
  • The u parameter carries the destination.
  • The researcher reported that the redirect succeeded, though Facebook could not reproduce it on their side.
  • A working Linkshim-protected endpoint should refuse to do this for a blocked site. The fact that it did redirect is the anomaly.

Step 2: observe the traffic in the proxy

With a proxy configured in Brave and Burp Suite running, the researcher requested the same URL again:

HTTP
https://l.facebook.com/l.php?u=https://test.facebook-whitehat.com

Line by line:

  • Same URL as before.
  • This time the proxy is watching every request the browser makes.
  • In the proxy log, the researcher saw that the browser requested https://test.facebook-whitehat.com directly and never requested l.facebook.com for validation.
  • In other words, the browser requested the destination directly and did not request l.facebook.com for validation.

This is the moment the bug became clear. The server was fine. The browser was quietly cutting out the middleman.

Step 3: report to the browser vendor

The researcher reported the behaviour to Brave. The report was accepted within a day, and the team attributed it to a browser feature called URL Debouncing. The issue was filed in the medium category and later upgraded to high by the team. The researcher's follow-up research found that the behaviour produced an open redirect on major sites including Facebook, Amazon, YouTube and Reddit.

An open redirect is a vulnerability where a website will send a visitor to any address supplied in the URL, without checking whether that address is safe. Attackers use it to make a malicious link look like it belongs to a trusted site: the link starts with facebook.com (or amazon.com, and so on), so victims trust it, but it ends up on the attacker's page. It is like a taxi driver who will take you anywhere a stranger tells him to, even though the taxi has the company logo on the door.

Root cause

The flaw is in the browser, not in the server-side shim. Brave attributed the behaviour to a browser feature called URL Debouncing. The report does not describe how it works. Because the intermediary is never contacted, its server-side validation (Linkshim) is bypassed. Facebook's defence was working as designed; it simply never got the chance to run.

"Debouncing" in general means waiting a moment before acting, to avoid doing something repeatedly. In a browser, the idea is to skip unnecessary intermediate steps and go straight to where the user is heading. The report does not describe the implementation of URL Debouncing beyond naming it.

Impact

The result is an open redirect on sites that rely on a redirect endpoint for link validation, with Facebook, Amazon, YouTube and Reddit named by the researcher. The researcher found that the behaviour produced an open redirect on major sites including Facebook, Amazon, YouTube and Reddit. The condition is that the victim uses a browser exhibiting the debouncing behaviour.

Fix

The report was accepted by Brave within a day and attributed to URL Debouncing. On the server side, nothing needed changing, since the shim and Linkshim behaved correctly when they were actually reached.

Variants to test

If you want to look for similar issues yourself, here are the same ideas in plain terms:

  1. Take any site that wraps outbound links in a redirect endpoint with a destination parameter, and request the endpoint with a destination the site blocks. A positive result is a redirect to the blocked destination when the request is made through a browser with debouncing behaviour, while the same URL through a proxy shows the browser skipping the intermediary.
  2. Compare proxied and unproxied traffic for the same redirect URL. A positive result is the proxy log showing a direct request to the final host and no request to the redirect endpoint.
  3. Repeat with several browsers and versions to see which ones skip the intermediary. A positive result is one browser bypassing the check while others follow the redirect chain.
  4. Test redirect endpoints on other large platforms named in the report (Amazon, YouTube, Reddit) with a destination their link filters reject. A positive result is the browser reaching the rejected destination without the filter being consulted.

Takeaway

The researcher's own advice: always be aware and test whatever feels out of order. The bug was not found by a clever tool; it was found by noticing that something did not add up and asking why.

Glossary

  • API: a defined way for one piece of software to talk to another, like a menu of requests a service will accept.
  • Blocklist: a list of addresses or domains a system refuses to interact with, usually because they are known to be malicious.
  • Bounty: a payment a company gives to a researcher who reports a valid security bug.
  • Brave: a web browser built on the same engine as Chrome, with extra privacy features.
  • Burp Suite: a security testing tool that includes a proxy for inspecting and modifying web traffic.
  • Client-side: happening in software on the user's own computer (such as the browser) rather than on the server.
  • CVSS: a standard scoring system for rating the severity of security vulnerabilities.
  • Domain: a human-readable name for a server on the internet, such as facebook.com.
  • Endpoint: a specific address on a server that handles a particular kind of request.
  • HackerOne: a platform where researchers report security bugs to companies and can receive bounties.
  • HTTP / HTTPS: the protocol browsers use to talk to web servers; HTTPS is the encrypted version.
  • Link shim: an intermediary address a site routes outbound links through so it can inspect the destination before redirecting.
  • Linkshim: Facebook's system for checking whether a link destination is on its malicious list.
  • Open redirect: a vulnerability where a site will send a visitor to any address supplied in the URL, without checking whether it is safe.
  • Parameter: the part of a URL after a question mark that carries extra information, such as ?u=....
  • Proof-of-concept (POC) video: a recording that demonstrates a bug happening step by step.
  • Proxy: software that sits between your browser and the internet and records (or modifies) the traffic passing through it.
  • Redirect: a server response telling the browser to go to a different address instead.
  • Root cause: the underlying reason a bug exists, as opposed to its visible symptoms.
  • Server-side: happening on the server that the company controls, rather than on the user's computer.
  • Severity: how serious a vulnerability is judged to be, often rated low, medium, high or critical.
  • URL: the address of a resource on the internet, such as https://example.com/page.
  • URL Debouncing: a browser feature, named by Brave, that causes the browser to request the final destination directly instead of following the redirect chain through an intermediary.
  • Vendor: the company that makes a product, such as Brave Software for the Brave browser.
  • Vulnerability: a weakness in software that can be exploited to cause harm or unwanted behaviour.

More by Abhinav Kumar

View all

1 more disclosed report, best first.

More from Brave Software

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.