Skip to content
Open redirect Write-up Intermediate

How I bypassed the same open redirect endpoint not once, not twice… but FOUR times

The login page's next parameter could be tricked into redirecting users to an attacker-controlled site despite repeated fixes. The author bypassed the open redirect protection four times using different malformed values, though the fourth payload is not disclosed.

ektuhacker Follow

Published on ektuhacker.medium.com

Hey bug hunters, grab a snack and listen up! This is the story of how I beat an open redirect bug on one website four times by never giving up.

Ektu_Hacker/SANDIP, on ektuhacker.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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the redirect target validation was incomplete and could be bypassed with malformed URL forms or header-like input.

Impact

An attacker could craft a link on the trusted site that redirects victims to a malicious site, which may aid phishing; the text does not describe any further harm.

What the attacker needed

Victim clicks a crafted link; login page with next parameter

The fix

The redirect target should be strictly validated against an allowlist and reject malformed or header-like values; the text says earlier fixes were applied but were bypassed.

How it was found

  1. Find the login page with a next parameter used for post-login redirects.
  2. Try common redirect values such as a full external URL and a bare domain; these were blocked.
  3. Try a value with three leading slashes before the external domain; the site redirected to the external site.
  4. After a fix, try a value with an allowed-looking prefix followed by three slashes and the external domain; the site redirected again.
  5. After another fix, try a value that looks like a Location header followed by the external URL; the site redirected again.
  6. Later, apply a new trick learned elsewhere to the same endpoint; a fourth bypass worked and was reported.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

An open redirect is when a website takes a link parameter and sends you to whatever address is in it, even a bad site. Here the login page used a next parameter to decide where to go after login, and the author found ways to sneak an outside address past the checks. That can help phishing because the link starts on the real site.

What is Open redirect?

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

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.