Skip to content
Open redirect Write-up Beginner

Cool Open Redirect With Bypass

A login page took a redirectUrl parameter and only checked that it did not start with a double slash, contained '.do' and started with the site origin. An attacker could craft a URL that passed these checks but sent the user to an external site, because the userinfo part of the URL made the browser treat the attacker domain as the host.

medium.com

Published on medium.com

Today I’ll share a quick article about the nicest open redirect issue I’ve ever found.

pm, 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 redirect validation used simple string checks (prefix and substring matching) instead of parsing the URL and comparing the real host, so a URL with the trusted origin in the userinfo section passed.

Impact

A victim who clicks the crafted link could be sent to an attacker-controlled site from a trusted-looking domain, which may aid phishing; the text does not claim more than the redirect itself.

What the attacker needed

Victim clicks a crafted link; no account needed

How it was found

  1. Find the checkSession.do page and read its JavaScript to see how redirectUrl is validated.
  2. Note the three conditions the parameter must satisfy and that the check parameter accepts an unexpected value.
  3. Build a link where the trusted origin appears before an @ sign and the real host is the attacker domain, ending in .do.
  4. Open the link and confirm the browser is redirected to the external site.

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 site takes a link from the address bar and sends the visitor there without checking properly. Here the check looked for the site's own name at the start of the link, but a link can contain the site's name before an '@' sign and still actually go to a different site. So a victim clicking the crafted link ends up on the attacker's page while the link looked trustworthy.

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.