Skip to content
OAuth / SSO Write-up Intermediate

How I Found an OAuth Token Leak, Bypassed Authentication, and Ch

The OAuth access token was leaked in the URL after login and did not expire, allowing anyone with the link to log in without re-authentication. The token was also sent to five third-party domains via URLs, exposing it to those parties.

Tanishx0h Follow

Published on cybersecuritywriteups.com

Hello hackers! In this write-up, I’ll share a recent bug I discovered while testing one of my old targets.

Tanishx0h, on cybersecuritywriteups.com

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

Likely the application placed the OAuth access token in the URL and did not enforce token expiry, and also sent it to third-party domains.

Impact

An attacker who obtains the leaked token link could log in as the victim without re-authentication, and the token's exposure to third-party domains could allow those parties to do the same.

What the attacker needed

Victim logs in via OAuth; attacker obtains the token URL

How it was found

  1. Log in using OAuth and observe the access token in the URL.
  2. Open the same URL in a different browser window to be logged in without re-authentication.
  3. Wait two hours and reuse the same token link to confirm it still works.
  4. Intercept requests after OAuth login and inspect redirects and external calls to find the token sent to third-party domains.

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 OAuth (like 'Log in with Google'), the service gives your browser a token that proves who you are. Here, that token was put in the web address, so anyone who saw the address could use it to log in as you, and it never expired.

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 Tanishx0h

View all

3 more disclosed reports, best first.

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.