Skip to content
OAuth / SSO Disclosed report Beginner

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.

anandpingsafe Follow

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

i.e. https://accounts.google.com/o/oauth2/auth?response_type=code&redirect_uri=https%3A%2F%2Fslack.com%2Fservices%2Fauth%2Fgdrive&client_id=19570130570-tfuuvh6hutjd09bq64is5sao643q67jg.apps.googleusercontent.com&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive&access_type=offline&approval_prompt=force&state=sehacure

As we can see in above URL there is no state parameter to maintain session identity.

Best regards, Anand

The original report as published on HackerOne, by anandpingsafe. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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.

More by anandpingsafe

View all

19 more disclosed reports, best first.

More from Slack

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

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.