Insecure JSON Web Token (Sensitive Claims)
- CWE 200
- OWASP 2025-A01
- OWASP 2025-A07
The payload of the token contains claims whose names suggest a secret or personal data, for example a password, a secret, an API key, a card number or a national identity number.
The payload of a signed token is not encrypted. It is only base64url encoded, and anybody who sees the token, including browser extensions, proxies, log files and the user's own device, can decode it with a one-line command.
Remediation
Remove the claims from the token. Keep only what the receiving service needs, typically a subject identifier, roles and the usual registered claims.
Look the data up on the server with the subject identifier instead of embedding it.
Encrypt the token (JWE) when confidential content has to travel with it.
Rotate any secret that was exposed this way.
References
Search Vulnerability
You may also see
- Insecure JSON Web Token (Unsigned)
- Insecure JSON Web Token (Weak Signing Secret)
- Insecure JSON Web Token (Missing Expiration)
- Insecure JSON Web Token (Excessive Lifetime)
- Insecure JSON Web Token (Sensitive Claims)
- Insecure JSON Web Token (Untrusted Key Reference)
- Insecure JSON Web Token (Exposed in URL)
- Insecure JSON Web Token (Cleartext Transmission)
- Insecure JSON Web Token
- Insecure Session Management