Skip to content
Open redirect Write-up Beginner

How I get 7 open redirect and 7 XSS in public program!

A login endpoint accepted a return parameter that was used as a redirect target without validation, allowing an attacker to send users to an arbitrary site. The same parameter also accepted a javascript: URL, giving script execution in the page context.

medium.com

Published on medium.com

In this article I would explain how I get open redirect and XSS issues in public bug bounty program on bugcrowd

Spider4, 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 used the user-supplied return parameter as a redirect destination and later as a script URL without validating or restricting it to trusted values.

Impact

An attacker could redirect users from the trusted login page to an arbitrary site and, with a javascript: value, run script in the page context; the report does not show what that script could reach.

What the attacker needed

A registered email address; victim clicks a crafted link

How it was found

  1. Find a subdomain that returns a blank page and fuzz it for files and directories.
  2. When fuzzing is blocked, resolve the host to its IP addresses and fuzz the IP directly.
  3. Open the endpoint that returned status 200 and observe a login page with an error.
  4. Add a return parameter to the URL and see the error disappear.
  5. Set the return value to an external site and submit a registered email address.
  6. Observe the redirect to the external site, then try a javascript: value with a trailing comment to get script execution.

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.

A web page sometimes takes a value from the address bar and uses it to decide where to send you next. If the site does not check that value, an attacker can make it point to their own site, or even to a script that runs in the victim's browser. Here the login page trusted a 'return' value and did no checking.

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.