State parameter missing on google OAuth
The Google OAuth authorisation request used by Slack's Google Drive integration lacked a state parameter, which is meant to act as an anti-CSRF token. An attacker could potentially exploit this to perform session hijacking attacks.
Originally disclosed on HackerOne
- Triaged in under an hour
- Fixed in 13 hours
- Disclosed after 36 days
Hi,
State parameter i.e anti-csrf token to prevent session hijacking attacks is missing on Google OAuth
As we can see in above URL there is no state parameter to maintain session identity.
Best regards, Anand
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
Likely the OAuth authorisation request was built without a state parameter, so there was no anti-CSRF token to bind the callback to the user's session.
Impact
An attacker could potentially perform session hijacking attacks, though the report does not demonstrate a working exploit.
What the attacker needed
No specific prerequisite stated in the report
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 log in using another service like Google, the website sends you to Google and then back. A 'state' value is a random code the website gives to Google and expects back, so it can tell that the returning request really came from you and not from someone else. Without it, an attacker might trick your browser into linking their account or hijacking your session.
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.