How I Found My First Open Redirect Bug (let’s hack)
A password reset email contained a link whose base64-encoded payload held a JSON 'url' parameter. By changing that URL to an arbitrary site and re-encoding it, the link redirected the user to the attacker's chosen destination.
medium.com
Published on medium.com
Well, well, after countless hours of scrolling through bug bounty write-ups and wondering how people magically find security issues, I finally stumbled upon my first real vulnerability: an open redirect. And guess what?
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 endpoint decoded a client-supplied payload and used its 'url' value as the redirect target without validating that it pointed to an allowed domain.
Impact
An attacker could craft a legitimate-looking password reset link that sends the victim to a phishing site, and any sensitive data in the URL could be exposed to that site.
What the attacker needed
A password reset request; victim clicks the crafted link
How it was found
- Request a password reset and receive the email link.
- Decode the base64 payload in the link to see the JSON with a url parameter.
- Change the url value to a different site and re-encode the JSON to base64.
- Replace the original payload in the link with the modified one and open it.
- Observe the browser being redirected to the chosen 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.
When you click a link, the website can send you on to another page. An open redirect is when the site lets anyone choose that next page through the link itself. Here, the password reset email carried a hidden setting that said where to go next, and the site did not check that the destination was its own.
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.