SecurityZines.com Join

JSON Web Tokens

Header, payload, signature, and how JWTs get attacked

Identity & AuthSketchnote

JSON Web Tokens (Header, payload, signature, and how JWTs get attacked): hand-drawn explainer poster

What it is: a JWT is three Base64URL parts joined by dots: a header (the algorithm), a payload (claims like sub, exp) and a signature over the first two. Anyone can read the payload; only the signature proves it was not changed.

How it is used: the server signs a token at login and the client sends it as Authorization: Bearer …. The server verifies the signature and expiry, with no session lookup.

Classic attacks: accepting alg: none, algorithm confusion (an RS256 public key used as an HS256 secret), weak HMAC secrets, and missing expiry checks. Pin the algorithm, validate exp, aud and iss, and keep tokens short-lived.

More on Identity & Auth

All 7

Get the next one by email

New posters land in the Security Zines newsletter on Substack. Free, no spam.