Open Redirect Validation Bypass Leads To Account Take Over (ATO)
The redirect_uri parameter was validated with a regex that could be bypassed by appending an encoded @ and an attacker host, so the login flow redirected the access_token JWT to the attacker's server. The attacker could then use that token to take over the victim's account.
Unfortunately, none of them worked. However, when I tried redirecturi=target.com%40myburpcollab.com and logged in, it resulted in a redirect to burp collab!!
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_uri validation used a regex that only checked the host prefix and did not reject an encoded @ character, allowing the host to be overridden by the part after the @.
Impact
An attacker could obtain the victim's access_token JWT and use it to gain full access to the account, resulting in account takeover.
What the attacker needed
Victim logs in via the crafted redirect_uri; attacker can host a server to receive the token
How it was found
- Browse the site and focus on the register function, noticing the redirect_uri parameter.
- Test for open redirect and find a regex validation on the parameter.
- Complete normal registration and observe that login redirects with an access_token JWT parameter.
- Try several bypass payloads for redirect_uri, none of which work.
- Try redirect_uri=target.com%40myburpcollab.com and log in, which redirects to the Burp Collaborator server.
- Take the access_token from the URL and use it to gain full access to the 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 another page with a special code in the web address that proves who you are. The site tried to check that this return address was its own, but the check could be fooled by adding an extra part to the address. The attacker made the site send the secret code to their own server, then used it to log in as the victim.
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.