OAuth

Informational

OAuth 2.0

Definition

OAuth 2.0 is an authorization framework that lets third-party applications obtain limited access to a user's resources on another service without sharing credentials. It uses flows such as Authorization Code, Implicit and Client Credentials. Incorrect OAuth implementations are a frequent source of vulnerabilities such as account takeover and token theft.

Impact

Account takeover by stealing the authorization codeAccess token theft via open redirect in redirect_uriUnauthorized access to user data on third-party servicesCSRF in the OAuth flow to link the attacker's accountPrivilege escalation by manipulating scopes

Examples

Authorization Code theft via a tampered redirect_uri

If the OAuth authorization server does not strictly validate the redirect_uri (allowing subdomains, arbitrary paths or lookalike domains), the attacker can redirect the authorization code to their own server, gaining access to the victim's account.

# Normal OAuth flow:
GET /authorize?response_type=code
  &client_id=app123
  &redirect_uri=https://app.com/callback
  &scope=email
  &state=random123

# Attack: tamper with redirect_uri
GET /authorize?response_type=code
  &client_id=app123
  &redirect_uri=https://app.com.evil.com/callback
  &scope=email
  &state=random123

# If the OAuth server does not strictly validate redirect_uri,
# the authorization code is sent to the attacker's domain

Practice OAuth with real labs

Apply what you've learned in safe environments based on real bug bounty reports.

See practice labs
4,185

hunters training

68

labs from real hacks

2,125

completions

$14,790

paid out for these bugs

6 flags captured this week·Real hacks from HackerOne · YesWeHack · Bugcrowd·No commitment·Free Academy
Free · no account

The checklist I run on every new target

47 checks ordered by cost: first what can get you in trouble, then the cheap stuff, and finally the expensive stuff — which is where the big bounties are. I'll send it to your inbox right now.

Unsubscribe in one click, from any email.

BBLabs · bug bounty training

Stop reading about bugs and start hunting them

Create your free account and practice on labs based on real hacks that paid out thousands of euros. The Academy is free forever.

No card · free Academy · cancel anytime

The community

This isn't a platform with users.It's people breaking the same things you are.

Inside people ask, share what they found and solve together what would block anyone on their own. It's free to join: no account, no plan, no email required.

Join the BBLABS community on Discord
Join the Discord

Free and open. You don't need a BBLABS account to join.