Skip to content

JWT, and the alg:none hole

Level: 301 · working knowledge

Stub — an outline, not a lesson. There is no runnable example behind this page yet, so nothing on it has been through the check that backs every other claim in this library. The bullets below are the questions the finished page has to answer.

One line: A token that carries its own claims and its own signature — including, for several years, a field letting the sender say the signature was optional.

The questions this page has to answer

  • Decode one by hand: three base64url segments, and note that the payload is not encrypted.
  • What does the signature prove, and to whom?
  • alg: none: how a library that trusted the header let anyone forge any token.
  • The HS256/RS256 confusion attack — the same field, a different way.
  • When is a JWT the wrong tool? (Revocation, and why a stateless token cannot be un-issued.)

See also