Skip to content
Open redirect Write-up Beginner

An interesting duplicate: open redirect I found while bug hunting

A checkout endpoint accepted a path parameter that was embedded into a JWT and later used as the href of the site's home icon, allowing an attacker to supply a value like @evil.com that redirected users to an external domain. The author reported it as a low-severity open redirect, but the program marked it as a duplicate.

medium.com

Published on medium.com

Hello today I want to share a neat little finding I stumbled on while hunting bug bounties. It’s not the highest severity, but the path to the discovery was fun and it’s a good example of how small bits of information can chain together.

Diman, 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 server accepted a user-controlled path value into the JWT and rendered it directly as a link target without validating or canonicalising the redirect destination.

Impact

An attacker could craft a checkout link that, when the victim clicks the site's home icon, redirects them to an attacker-controlled domain, which could be used for phishing; the author found no clean way to escalate it further.

What the attacker needed

Victim clicks a crafted checkout link; victim clicks the site's home icon

The fix

The redirect target should be validated and canonicalised server-side, and URL-like values from tokens or client input should not be trusted implicitly.

How it was found

  1. Notice a token parameter in the checkout URL and decode the JWT to find a redirect_url field.
  2. Find the API endpoint that creates the JWT, which takes a path parameter.
  3. Change the path parameter from /home to a test value and confirm the home icon's href changes.
  4. Set the path parameter to @evil.com and click the home icon to be redirected to evil.com.

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 JWT is a token that carries data, and here it included a redirect address. The site put that address into the home button's link without checking it, so a crafted value could send people to another website. This is called an open redirect.

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.