Weaknesses in JSON Web Token validation: alg:none, algorithm confusion (RS256→HS256), weak secrets, and unvalidated claims.
How it works
alg:none— strip the signature and keep a trailing dot; a trusting verifier accepts it.- RS256→HS256 confusion — sign with HMAC using the RSA public key as the secret.
- Also check
kidpath traversal,jku/x5uURL injection, and crackable HMAC secrets (hashcat -m 16500).
Detection & defence
- Pin the expected algorithm server-side; never trust the header
alg. - Verify the signature before reading any claim; keep keys out of the token.

