The JWT expiration claim defines the point after which a token must no longer be accepted. It limits how long a token can be replayed if stolen or leaked. Enforcing expiration reduces the window of abuse and helps prevent old credentials from remaining usable indefinitely.
What the JWT expiration claim actually does
The expiration claim is the token’s built-in time limit. It tells a verifier when the token must stop being accepted, even if the token’s signature still checks out. That makes it a control on token lifetime, not on user intent, and it is one of the simplest ways to reduce the replay value of a stolen or leaked JWT.
Its security value is mostly about constraining the abuse window. A valid token can still be dangerous if it is copied, intercepted, logged, or recovered from a browser, app, or proxy; expiration limits how long that artifact remains useful to an attacker.
Why token expiry matters for JWT security
JWTs are often used as bearer credentials, so possession can be enough to use them. If expiry is too long, a compromised token may remain usable long after the original session should have ended. If expiry is too short, legitimate clients may need frequent renewal, which increases operational complexity and can push teams toward unsafe workarounds.
Expiry also interacts with other JWT checks. A signed token can still be rejected for being too old, but the inverse is not true: a token that has not expired is not automatically trustworthy unless the issuer, audience, signature, and claim set are also validated correctly. The claim is therefore part of a broader validation model, not a standalone protection.
For practical guidance on the surrounding controls, NHIMG’s JWT Security Guide covers claim validation, algorithm pinning, and JWT attack controls in one place.
How organisations should think about expiry settings
Choosing an expiry is a trade-off between abuse resistance and usability. Shorter lifetimes reduce replay risk, but they work best when clients have a safe renewal path and the application can tolerate token refresh. Longer lifetimes are sometimes acceptable for low-risk, low-privilege use cases, but they should be justified rather than defaulted.
Expiry should also match the token’s purpose. Access tokens usually need much shorter lifetimes than long-lived session state or refresh material, and the expiry decision should reflect what the token can do if it is stolen. A token that authorises high-impact actions should generally age out faster than one used for lower-risk read-only access.
Where bearer tokens are used with services and workloads, expiry is only one part of the control story. The broader problem is reducing the value of stolen token material through short lifetimes, narrow audience use, and stronger binding where possible. NHIMG’s Token and Session Security Guide explains how expiry fits into replay resistance, token theft defense, and sender-constrained patterns.
Expiry, replay, and key compromise
Expiration becomes especially important when tokens or signing material are exposed outside the intended trust boundary. A leaked JWT can be replayed until it expires, and a compromised signing key can let an attacker mint apparently valid tokens until the key is rotated and the forged tokens age out or are otherwise invalidated.
That is why expiry should be viewed alongside key management and incident response, not as a standalone safeguard. When signing keys are compromised, the risk is not only that future tokens may be forged, but also that existing tokens may remain trustworthy for too long if the organisation cannot retire them quickly enough.
NHIMG’s Microsoft Storm-0558 key breach 2023 is a concrete example of why token trust, signing keys, and token lifetime must be treated as one security problem.
Why JWT expiration is often paired with broader trust controls
Expiration helps, but it does not prevent theft in the first place, and it does not make a stolen token harmless while it is still valid. Strong implementations pair expiry with audience checks, issuer validation, scoped authorisation, secure storage, and, where appropriate, token binding or proof-of-possession mechanisms.
That is especially important in distributed systems, where JWTs move across APIs, gateways, and services. The more places a token can travel, the more important it becomes to keep its lifetime tight and its accepted use narrow. This is one reason JWT expiry is best understood as one control in a layered token-security design rather than as the main defence on its own.
For broader identity and token control context, OAuth Scope Design Guide is useful where expiry needs to be considered together with delegated permissions and access scope.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST SP 800-57, NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| NIST SP 800-57 | 4 — Key Management Guidance | JWT expiry intersects token trust and signing-key lifecycle. |
| Recommendation — Align token lifetime with cryptoperiod and key-rotation policy so leaked tokens age out quickly. | ||
| NIST SP 800-53 Rev 5 | IA-5 — Authenticator Management | JWTs function as authenticators whose lifetime and renewal need control. |
| Recommendation — Set and enforce token lifetime, renewal, and revocation rules for authentication material. | ||
| OWASP ASVS | V9 — Self-contained Tokens | JWTs are self-contained tokens whose validity window and claim checks matter. |
| Recommendation — Validate token expiry, audience, issuer, and revocation handling for self-contained tokens. | ||
| OWASP Non-Human Identity Top 10 | NHI-07 — Long-Lived Secrets | JWTs used as bearer material become risky when validity windows are too long. |
| Recommendation — Keep token lifetimes short and avoid long-lived bearer material where abuse risk is high. | ||
| MITRE ATT&CK | T1528 — Steal Application Access Token | Token theft becomes exploitable until expiry limits replay opportunities. |
| Recommendation — Detect token theft and replay attempts around access-token abuse paths. | ||
Related resources from NHI Mgmt Group
- What do security teams get wrong about token expiration in JWT authentication?
- How should security teams use the JWT aud claim in production applications?
- What breaks when JWT claim semantics are not standardised?
- How should security teams design JWT claim based routing in API gateways without creating brittle access paths?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 31, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org