Unveiling the One-Click Account Takeover: It Started with an Innocent Open Redirect
The login flow accepted an arbitrary redirect_uri and sent the authentication token to that address in the URL after login. An attacker could craft a link that sends a victim's token to a server they control, then use the token to log in as the victim.
Greetings psycho security voyagers! Today, we embark on a riveting journey into the labyrinth of vulnerabilities, where every little action tells a story of triumph or, in our case, potential catastrophe.
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 authorisation endpoint did not validate the redirect_uri against an allowlist and placed the auth token in the redirect URL, so the token followed the attacker-controlled redirect.
Impact
An attacker could take over a victim's account with a single crafted link, provided the victim follows it and the token is delivered to the attacker's server.
What the attacker needed
Victim clicks a crafted link; attacker-controlled server to receive token
How it was found
- Create an account and log in, noting the redirect_uri parameter in the URL.
- Change the redirect_uri value to an attacker-controlled domain and confirm the redirect happens.
- Use a collaborator link as the redirect target and observe the server sending the auth token there.
- Build a URL that passes the captured token as a code parameter to the account page.
- Remove the extra path segment so the URL points at the account page, which logs the attacker into the victim's account.
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 log in to a site, it sometimes sends you back to a page you came from using a link parameter. This site trusted that link completely and also put a secret login token in it. So an attacker could point the link at their own server, receive the victim's token, and use it to sign in as them.
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.