GUIDE 02 / WEB

JWT Analysis Checklist

A JWT is easy to decode and easy to misunderstand. Separate what the token claims from what the server has actually verified.

Start with the three-part structure

A compact JSON Web Token normally contains three dot-separated segments: header, payload, and signature. The first two are Base64URL-encoded JSON. They are not encrypted. Anyone holding the token can usually read them.

base64url(header).base64url(payload).signature

The header describes how the token is intended to be processed. The payload contains claims. The signature binds those bytes to a key and algorithm. Decoding the first two parts does not prove that the signature is valid.

Record the alg and typ values, then look for key selection fields such as kid, jku, or x5u. In a legitimate assessment or CTF, those fields may reveal how the verifier chooses a key. Do not assume that changing alg changes server behavior; the server must still accept the modified token.

Read claims as untrusted input

ClaimQuestion to ask
issWho issued the token, and does the application validate it?
audWhich service is the token intended for?
subWhich identity does the token describe?
expIs the expiration in the future, and is it interpreted as Unix seconds?
nbfWhen does the token become valid?
iatWhen was it issued, and is that time plausible?

Application-specific fields such as role, admin, or scope are only assertions until the signature and surrounding authorization logic have been verified.

A safe CTF inspection example

Decode the sample token in the local JWT tool. If the payload contains "admin": false, changing it to true will invalidate the original signature. The useful question is not “can I edit the JSON?” but “does the challenge verifier incorrectly accept the edited bytes?” Keep the original and modified versions separate so your test remains reproducible.

Decoding is not verification

Hexforge displays header and payload contents locally. It does not possess the issuer's key and does not claim that a token is authentic.

Common mistakes

Using milliseconds for JWT time claims

JWT numeric dates are normally Unix seconds. A 13-digit value is usually milliseconds and may indicate custom application behavior or a mistaken conversion.

Ignoring the exact signing input

The signature covers the encoded header, a dot, and the encoded payload. Reformatting JSON or changing padding changes those bytes even when the displayed object looks equivalent.

Testing systems without permission

Only analyze tokens from your own applications, authorized labs, or CTF environments. A token may contain personal or session data even when its payload is readable.

Repeatable checklist

  1. Preserve the complete original token.
  2. Count segments and decode header and payload.
  3. Record the algorithm and key-selection fields.
  4. Convert exp, nbf, and iat to readable time.
  5. Treat all claims as untrusted until signature verification is established.
  6. Document every mutation and server response in the challenge workspace.