Skip to content
OAuth / SSO Write-up Intermediate

OAuth: A Backdoor in Disguise — a $7500 Study Case

The application's OAuth implementation allowed reuse of authentication codes and passwords, and failed to verify the JWT signature, so the user identifier could be altered. A separate user enumeration endpoint leaked OAuth IDs, enabling an attacker to impersonate any user who had logged in via OAuth.

xdead4f Follow

Published on xdead4f.medium.com

In a recent security assessment, I uncovered two critical vulnerabilities in an application’s authentication system, both related to weak OAuth implementation. The application, used for planning and social media management, had serious flaws in its use of Oauth ID for authentication, leading to a payout of $7,500.

0xdead4f, on xdead4f.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

Root cause

Likely the server did not verify the JWT signature and accepted reusable authentication codes, while a separate endpoint exposed user identifiers.

Impact

An attacker could impersonate any user who had logged in via OAuth, effectively bypassing authentication and taking over accounts.

What the attacker needed

Victim has logged in via OAuth; attacker has a valid account

The fix

The vulnerabilities were resolved according to the timeline.

How it was found

  1. Log in to the application via OAuth to obtain a valid bearer token.
  2. Send a POST request to the user endpoint with the target user's email to retrieve their OAuth ID.
  3. Modify the JWT's subject claim to the target's OAuth ID and re-encode the token.
  4. Use the modified token to authenticate as the target user.

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 let you log in using another service, like Google. The app trusted a token without checking it was genuine, so someone could change the user ID inside it and pretend to be you. A second bug let anyone look up other users' IDs, making the first bug easy to exploit.

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 xdead4f

View all

1 more disclosed report, 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.