Skip to content
Open redirect Write-up Intermediate

From Open Redirect to Potential Account Takeover

The phone-based login flow trusted a redirectTo parameter and appended a temporary authentication token to the redirect URL, so an attacker could redirect the token to their own server. The attacker could then reuse that token to log in as the victim without completing OTP verification.

medium.com

Published on medium.com

During a manual bug hunting session on a web application, I discovered unexpected behavior in the phone-based login flow. What initially looked like a low-severity Open Redirect evolved into a potential critical Account Takeover (ATO) scenario.

G3kSec, 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 did not strictly validate the redirectTo parameter and placed a sensitive temporary token in the query string of the redirect URL.

Impact

The vulnerability could lead to account takeover of phone-verified accounts, PII exposure, and potential financial fraud or privilege escalation, though the triager noted that exploitation requires social engineering, a non-logged-in browser, and re-verification of the phone number.

What the attacker needed

Victim clicks a crafted link; victim has a phone-verified account; victim uses a non-logged-in browser; victim re-verifies their phone number

The fix

The application should enforce strict allowlist validation on redirectTo and avoid placing tokens in query strings, using secure alternatives instead.

How it was found

  1. Identify the redirectTo parameter in the login flow.
  2. Test bypasses such as the @ character to redirect traffic to the attacker's domain.
  3. Intercept the redirection with Burp Suite.
  4. Capture the temporary token on the attacker's server.
  5. Reuse the token in the browser to log in as the victim.

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.

When you log in with a phone number, the app sends a code and then gives your browser a temporary pass. The app also lets you choose where to go next using a redirectTo setting, and it put the pass in that address. Because the app did not check where it was sending you, an attacker could make the address point to their own site and receive your pass.

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.