Login CSRF using Google OAuth
The OAuth callback endpoint did not validate the state parameter, so an attacker could complete the Google OAuth flow for their own account and then send the victim a crafted redirect URL containing the attacker's state and code. The victim would then be logged in as the attacker, enabling a login CSRF attack.
- Triaged in 8 hours
- Fixed in 4 days
- Disclosed after 12 days
This bug is related to bug report [https://hackerone.com/reports/774] as this bug also allows a user to be logged in as the attacker.
An attacker could exploit this bug as follows:
Attacker initiates Google OAuth process with thisdata Attacker allows access to thisdata app Attacker records and drops redirection to thisdata (in order not to consume token) Attacker directs victim to /oauth/redirect?state={attacker's state}&code={attacker's code} Victim is now logged in as attacker
state parameter is solution for this but in this case state parameter is not getting validated on server side.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The server did not validate the OAuth state parameter on the redirect callback, allowing an attacker to supply their own state and code.
Impact
A victim could be silently logged in to the attacker's account.
What the attacker needed
Attacker has a Google account; victim clicks an attacker-supplied link
How it was found
- The attacker starts the Google OAuth flow for the application.
- The attacker grants the application access to their Google account.
- The attacker captures the redirect back to the application and drops it so the code is not used.
- The attacker sends the victim a redirect URL containing the attacker's state and code.
- The victim's browser completes the flow and the victim is logged in as the attacker.
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 report has not been written yet. The Original tab links to the source.
When you sign in with Google, the site sends you to Google and then back with a short code. A random value called 'state' is meant to be checked on return so the site knows the login started from your own browser. Here the site skipped that check, so an attacker could make you finish a login that actually belongs to their account.
What is CSRF?
Another site makes a signed-in user's browser perform an action they did not intend.