How OAuth Implicit Flow Led To Hundreds Of User Accounts Being Accessed?
The application trusted identity fields (such as email) sent by the client in the login POST body instead of validating the OAuth token server-side. An attacker could change the email to a victim's address and log in as that user, including administrators.
Published on payatu.com
A real bug-hunting walkthrough: how an OAuth Implicit Flow misconfiguration let an attacker log in as any user - admins and employees included - by swapping an email.
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
Impact
An attacker could gain complete control over user or employee accounts, including administrators, potentially leading to data manipulation and unauthorized actions.
What the attacker needed
A Google account; Victim's email address known
The fix
The application should validate OAuth tokens server-side and never trust identity fields supplied by the client; also rate-limit account-check endpoints.
How it was found
- Capture the OAuth login request in Burp.
- Observe the POST request containing user information and access token.
- Modify the email field to the victim's email address.
- Forward the request and observe redirection to 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 with Google, the app should check with Google that you really are who you say you are. Here, the app just believed whatever email address the browser sent, so someone could pretend to be another person by editing that email.
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.