strix/skills/vulnerabilities/authentication_jwt.md
JWT/OIDC failures often enable token forgery, token confusion, cross-service acceptance, and durable account takeover. Do not trust headers, claims, or token opacity without strict validation bound to issuer, audience, key, and context.
/.well-known/openid-configuration, /oauth2/.well-known/openid-configuration/jwks.json, rotating key endpoints, tenant-specific JWKS/authorize, /token, /introspect, /revoke, /logout, device code endpoints/login, /callback, /refresh, /me, /session, /impersonate{"alg":"RS256","kid":"...","typ":"JWT","jku":"...","x5u":"...","jwk":{...}}{"iss":"...","aud":"...","azp":"...","sub":"user","scope":"...","exp":...,"nbf":...,"iat":...}"b64":false) and critical headers ("crit")"alg":"none" and drop the signature if libraries accept it../../../../keys/prod.key, SQL/command/template injection in key lookup, or pointing to world-readable files/.well-known, /jwks.jsonjwt_tool -t <url> -rh "Authorization: Bearer <token>" -M at runs the
full attack matrix (alg=none, RS→HS confusion, kid injection, claim
edits) and reports which mutations the server still accepts.jwt_tool <token> -C -d <wordlist> brute-forces HMAC secrets when an
HS-family signature is in use.jwt_tool to mint a token under a key you control once you find an
acceptance path (kid/jku/x5u/jwk), then replay via repeat_request.Verification must bind the token to the correct issuer, audience, key, and client context on every acceptance path. Any missing binding enables forgery or confusion.