Apex › Security & web

JWT & the alg=none attack

The signed tokens behind most stateless auth: header.payload.signature, base64url-encoded, signed (not encrypted) so anyone can read the claims but only the key holder can forge a valid one. See a real HS256 token built with genuine HMAC-SHA256, toggle a claim to watch the signature change, then forge an alg=none token and watch a naive verifier accept the unsigned forgery while a strict one rejects it.

More in Security & web