OAuth 2.0 attack checklist: authorization code interception, redirect_uri bypass, CSRF on OAuth flow, state parameter abuse, open redirector chaining, token leakage via Referer, PKCE bypass, and scope escalation. Use when testing OAuth implementations in web apps or bug bounty.
74%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Medium
Suggest reviewing before use
Fix and improve this skill with Tessl
tessl review fix ./Skills/auth/offensive-oauth/SKILL.mdOAuth 2.0 attack checklist: authorization code interception, redirect_uri bypass, CSRF on OAuth flow, state parameter abuse, open redirector chaining, token leakage via Referer, PKCE bypass, and scope escalation. Use when testing OAuth implementations in web apps or bug bounty.
Use this skill when the conversation involves any of:
OAuth, OAuth 2.0, authorization code, redirect_uri bypass, OAuth CSRF, state parameter, PKCE bypass, scope escalation, token leakage, open redirector, OAuth attack
When this skill is active:
private_key_jwt or mTLS client authentication for confidential clientscode_verifier must be required and validated.nonce is present and matched; state should be unguessable and tied to session.redirect_uri exact match: Enforce exact string match against pre-registered allowlist; no wildcards/path traversal.aud/azp/iss enforcement: Validate tokens strictly, including clock skew and JWKS kid rotation behavior.token_type and audience.response_type=tokenresponse_type=code id_token for additional securityprivate_key_jwt or MTLS requiredgraph TD
User[Resource Owner] -->|Initiates flow| Client
Client -->|Authorization Request| AuthServer[Authorization Server]
AuthServer -->|Authentication| User
User -->|Approves access| AuthServer
AuthServer -->|Authorization Code| Client
Client -->|Code + Client Secret| AuthServer
AuthServer -->|Access Token| Client
Client -->|Access Token| ResourceServer[Resource Server]
ResourceServer -->|Protected Resource| Client
style User fill:#b7b,stroke:#333,color:#333
style Client fill:#aae,stroke:#333,color:#333
style AuthServer fill:#9f9,stroke:#333,color:#333
style ResourceServer fill:#e9a,stroke:#333,color:#333__Host- prefix with HttpOnly; Secure; SameSite.response_type=code/authorization?client_id=12345&redirect_uri=https://client-app.com/callback&response_type=code&scope=openid%20profile&state=ae13d489bd00e3c24/callback?code=a1b2c3d4e5f6g7h8&state=ae13d489bd00e3c24sequenceDiagram
participant User
participant Client
participant AuthServer as Authorization Server
participant API as Resource Server
User->>Client: 1. Click "Login with Service"
Client->>AuthServer: 2. Authorization Request (response_type=code)
AuthServer->>User: 3. Login & Consent
User->>AuthServer: 4. Approves Access
AuthServer->>Client: 5. Redirect with Authorization Code
Client->>AuthServer: 6. Token Request (code + client_secret)
AuthServer->>Client: 7. Access & Refresh Tokens
Client->>API: 8. API Request + Access Token
API->>Client: 9. Protected Resourceresponse_type=token/authorization?client_id=12345&redirect_uri=https://client-app.com/callback&response_type=token&scope=openid%20profile&state=ae13d489bd00e3c24/callback#access_token=z0y9x8w7v6u5&token_type=Bearer&expires_in=5000&scope=openid%20profile&state=ae13d489bd00e3c24sequenceDiagram
participant User
participant Client as Client (Browser)
participant AuthServer as Authorization Server
participant API as Resource Server
User->>Client: 1. Click "Login with Service"
Client->>AuthServer: 2. Authorization Request (response_type=token)
AuthServer->>User: 3. Login & Consent
User->>AuthServer: 4. Approves Access
AuthServer->>Client: 5. Redirect with Access Token in Fragment
Note over Client: Token stored in browser
Client->>API: 6. API Request + Access Token
API->>Client: 7. Protected Resourcestate parameter in auth requestsOpen Redirect → Authorization Code Theft:
CSRF → Account Linking Attack:
XSS → Token Theft:
Token Exchange → Service Impersonation:
Scope Elevation → Privilege Escalation:
IdP Confusion → Cross-Tenant Access:
JWT Algorithm Confusion → Signature Bypass:
SSRF via redirect_uri → Internal Service Access:
Token Replay → Session Hijacking:
Implement OAuth 2.1: Adopt latest security recommendations
Enforce state parameter: Always required, cryptographically random, single-use
Validate token claims strictly:
aud (audience): Must match resource serveriss (issuer): Verify against known issuersexp (expiration): Enforce with clock skew tolerance (max 60s)nbf (not before): Validate if presentSecure token storage:
__Host- prefix or memory-only storageHttpOnly; Secure; SameSite=Strict/par endpointSnailSploit/Claude-Red
6196ba7
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.