Insecure JSON Web Token (Missing Expiration)
- CWE 613
- OWASP 2025-A07
The token has no exp (expiration time) claim, so it is valid forever as far as the token itself is concerned. A token that leaks through logs, browser history, a proxy or a compromised device stays usable until the signing key is changed.
Remediation
Always set
expwhen issuing a token and enforce it when verifying.Keep access tokens short lived, for example a few minutes to an hour, and renew them with refresh tokens.
Add a revocation mechanism (token identifier list, key rotation or a server side session) for the cases where a token must be cut off before it expires.
References
Go Back to List
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