A JSON Web Token (JWT) has three parts: header (algorithm + type), payload (user data, claims, expiry), and signature (cryptographic proof the server issued it).
The signature is what makes the token trustworthy. If the server verifies it, you can't tamper with the payload without invalidating the token.
If the server doesn't verify it, or accepts any algorithm the client specifies, the signature is worthless.
The JWT specification allows an algorithm value of "none" — meaning no signature. Poorly implemented libraries that respect the client-supplied algorithm will accept a token with alg:none and skip signature verification entirely.
An attacker sets any user ID and role they want in the payload, signs with nothing, and the API accepts it as legitimate. This has affected dozens of libraries and platforms.
• Tokens that never expire — a stolen token works forever
• Weak signing secrets — brute-forceable "secret123" keys
• Not checking the exp claim — validating signature but ignoring expiry