Skip to content
Open redirect Write-up Beginner

The Curious Case of the Open Redirect ($500 Bounty)

The login flow accepted a user-controlled redirect_to parameter and used it to send users to an external site after clicking a magic login link. An attacker could craft a legitimate-looking login email that redirects the victim to a phishing page, and the parameter also allowed javascript: URLs leading to reflected XSS.

nareshkandula54 Follow

Published on medium.com

Open redirects are often dismissed as low-hanging fruit in web security โ€” a nuisance more than a threat. After all, an open redirect simply sends a user from a legitimate site to another URL.

Naresh Kandula, 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.

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 application failed to validate or restrict the redirect_to parameter to trusted domains and allowed javascript: schemes.

Impact

An attacker could use the legitimate login email to redirect victims to a phishing site and steal credentials, and could also execute JavaScript in the victim's browser via javascript: URLs, though the magic link is single-use.

What the attacker needed

Victim has a registered email; attacker can intercept requests; victim clicks the login link

The fix

The redirect_to parameter should be validated to allow only trusted internal URLs and reject external or javascript: schemes.

How it was found

  1. Go to the sign-in page and enter a registered email address.
  2. Intercept the outgoing login request with a proxy.
  3. Change the redirect_to parameter to an external URL.
  4. Forward the request; the server sends a login email.
  5. Open the email and click the login link.
  6. The browser first visits the legitimate site then redirects to the external URL.

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 happens when a website takes a link from the user and sends them there without checking it. Here, the login email contained a link that could be changed to point to an attacker's site, so a victim clicking a real company email could end up on a fake login page. The same parameter also allowed running JavaScript, which is a script injection bug.

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.

More by nareshkandula54

View all

1 more disclosed report, best first.

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.