$8,800 for a Redirect Nobody Validated: Stealing OAuth Tokens Thr
An open redirect on the OAuth provider's own domain allowed an attacker to register a redirect_uri that passed domain validation but then forwarded the access token to an attacker-controlled site. In the implicit flow, the token was carried in the URL fragment through the redirect, letting the attacker steal it and gain the approved permissions.
Open redirects usually get dismissed quickly during triage, and for good reason — on their own, “this URL redirects somewhere I chose” rarely causes real harm beyond aiding a phishing page’s credibility. This one escalated past that baseline because the redirect lived on the exact domain an OAuth flow had been…
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
The OAuth authorization endpoint validated redirect_uri by domain only, without accounting for open redirect paths on that same trusted domain.
Impact
Any user completing an OAuth consent flow for an application registered with this chained redirect_uri has their access token exposed to the attacker, granting whatever permission scope was approved.
What the attacker needed
Attacker can register an OAuth application; victim completes OAuth consent flow; open redirect on trusted domain
The fix
Pinehaven fixed both the redirect_uri validation and the underlying open redirect within a week, and confirmed migration planning toward authorization code flow.
How it was found
- Find an open redirect on the OAuth provider's domain via a url parameter.
- Register an OAuth application with redirect_uri set to the open redirect path pointing to an attacker-controlled capture endpoint.
- Complete the OAuth consent flow using a test account and the registered application.
- Observe the access token arriving at the capture endpoint after passing through the open redirect.
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.
OAuth is a way for apps to ask a user to grant access to their account without sharing a password. In the implicit flow, the access token (a key that grants access) is sent back in the URL after the user approves. Here, the site trusted any address on its own domain, but that domain had a redirect feature that could send the token on to an attacker.
What is OAuth / SSO?
Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.