Skip to content
OAuth / SSO Write-up Intermediate

OAuth Authentication Bypass leading to PII disclosure

The OAuth token endpoint accepted a client_credentials grant without validating the client_id and client_secret, issuing access tokens to anyone. The attacker used the token to access a search endpoint and retrieve approximately 12MB of customer data.

medium.com

Published on medium.com

Hi — I’m janlele91, an ethical hacker and pentester based in Vietnam, currently working at Viettel Cyber Security (VCS). I also hunt on bug bounty platforms in my spare time, mostly on Bugcrowd.

janlele91, on medium.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

Impact

An attacker could obtain access tokens without credentials and use them to extract customers' personally identifiable information and user data from the application.

What the attacker needed

Access to the internet; knowledge of the token endpoint URL

How it was found

  1. Find an old subdomain with a login page that uses OAuth password grant.
  2. Send a token request with grant_type=client_credentials and no client credentials.
  3. Receive an access_token and refresh_token.
  4. Inspect frontend JavaScript to list backend endpoints.
  5. Try the token on each endpoint; one search endpoint accepts it.
  6. Query the search endpoint with query=1 and retrieve about 12MB of customer data.

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.

OAuth is a way for apps to get permission to access data. The client_credentials flow is meant for machines, but here the server didn't check the machine's identity, so anyone could get a token. That token then let the attacker read customer data from an API.

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.

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.