Skip to content
Open redirect Write-up Intermediate

Open-redirect to Account Takeover.

The login page's 'next' parameter allowed redirects to external sites, and also accepted javascript: URLs without filtering. An attacker could craft a link that executes JavaScript in the victim's browser, stealing cookies and leading to account takeover.

Rishabh Follow

Published on medium.com

Hi everyone this is my first writeup about my first bug and I want to share how I escalated open redirect to Account Takeover. Let’s go

Rishabh, 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 'next' parameter to safe, internal URLs, allowing both external redirects and javascript: scheme injection.

Impact

An attacker could steal a victim's cookies and take over their account by tricking them into clicking a crafted link.

What the attacker needed

Victim clicks a crafted link; victim is logged in

How it was found

  1. Identify the login URL with a 'next' parameter that redirects after login.
  2. Test if the parameter accepts an external URL like https://google.com.
  3. Try a javascript: scheme in the parameter to see if it executes.
  4. Craft a payload using backticks to bypass quote and parenthesis filters.
  5. Use jQuery's getScript to load an external script that steals cookies.

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 lets a website send you to any other site via a link parameter. Here, the same parameter also accepted a 'javascript:' link, which runs code in your browser. That let the attacker steal your login cookies and take over your account.

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.