Module lessons (3/4)
Breaking Weak JWTs (alg: none & Claims)
Tamper JWT headers and role claims interactively, forge an unsigned alg:none token, and enforce strict header algorithm pinning.
What you'll learn in this lesson
- Decode and inspect the three Base64URL segments of a JSON Web Token (Header, Payload, Signature).
- Exploit a vulnerable JWT verifier that blindly honors
'alg': 'none'or trusts unverified header fields. - Enforce server-side algorithm pinning plus fail-closed
iss,aud,nbf,exp, andjticlaim validation.
Overview
A JWT looks opaque, yet its Header and Payload are plain Base64URL-encoded JSON readable by anyone. Security collapses completely if a verifier decides how to validate a token based on what the untrusted attacker wrote inside header.alg.
Walk through why decoding and trusting header fields before verification fails:
Sections covered in this lesson
- 11. Anatomy of a JWS & Header Confusion Attacks
- 22. Interactive Explorer: JWT Header & Claims Tampering
- 33. Progressive Labs: Warm-Up → Attack → Defend → Harden
- 44. Checkpoints & Code Review
Unlock "Breaking Weak JWTs (alg: none & Claims)" and the full Application & Web Security curriculum
Tamper JWT headers and role claims interactively, forge an unsigned alg:none token, and enforce strict header algorithm pinning.
Unlock all 6 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.
- Instant access to all advanced modules in Application & Web Security plus 17 more courses
- Hands-on browser exercises with automated test suites and solutions
- 14-day money-back guarantee processed via Paddle.com
14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.