AI Agent Hub
Back to skills
🔒

JWT and OAuth Token Attacks

IT Ops & Security Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @user_3c6cb52e/jwt-oauth-token-attacks-lr-0xh6

About this skill

Problem It Addresses

Modern web apps often use JWT and OAuth 2.0 for login state and authorization, but once a token is issued it can become an attack surface: signatures may be weakened through alg:none, RSA public keys may be misused for HMAC verification, weak secret values may be cracked, kid / jku headers may be injected, or poorly configured state, redirect_uri, nonce, and PKCE flows may enable session hijacking and token leakage.

How The Skill Works

This skill provides a token-centric attack playbook:
- JWT cryptographic attacks: check alg switching, key confusion, weak-secret cracking, and kid / jku header injection.
- OAuth / OIDC flow attacks: cover CSRF, open redirect, token theft, and implicit flow abuse.
- PKCE and token leakage: examine code / code_verifier bypass, plus token exposure via Referer, logs, and front-end routing.

It fits authorized penetration testing, red-team exercises, CTF analysis, and internal threat modeling when the goal is to break an authentication chain into inspectable items.

Boundaries And Notes

The material is attack-oriented and should be used only on clearly authorized targets; avoid interfering with real user sessions in production. When the assessment involves deeper OIDC parameters, cross-origin APIs, or enterprise SSO, pair it with oauth oidc misconfiguration, cors cross origin misconfiguration, and saml sso assertion attacks.

Use Cases

  • During authorized penetration testing, check login endpoints for alg:none, RS256→HS256, or kid injection.
  • Audit OAuth login flows for state, redirect_uri, nonce, and PKCE weaknesses that could be bypassed or hijacked.
  • Inspect front-end routing, Referer, and access logs for exposed access_token, refresh_token, or authorization codes.
  • In CTF or red-team exercises, build verifiable attack hypotheses around JWT headers and authorization code flows.

Best For

  • Application security engineers who need to map JWT and OAuth attack surfaces
  • Red-team engineers who need to verify token abuse risks and document penetration test findings
  • CTF players who need to identify authentication chain weaknesses quickly
  • Backend architects who need to review enterprise SSO integration boundaries