Join our Newsletter — 33% off our NHI Course
Home› Glossary› Authentication, Authorisation & Trust› Expiration and Not Before Claims
Authentication, Authorisation & Trust

Expiration and Not Before Claims

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: Authentication, Authorisation & Trust

Expiration and Not Before Claims are the JWT registered claims exp and nbf, which set the time window in which a token is valid. A token must be rejected at or after exp and before nbf. Validators that skip these checks accept stolen or replayed tokens indefinitely, so verify both, allow only small clock skew and keep lifetimes short.

JWT time-window claims and why they matter

Expiration and not before claims bound a JWT to a valid time window. That makes them a core part of token acceptance, not a cosmetic metadata field. A validator that ignores either claim can accept a token before it should work or after it should have expired, which weakens replay resistance and shortens the effective life of a stolen token only if the checks are actually enforced.

JWT Security Guide covers the surrounding validation rules that keep token handling safe, including claim checks, key handling and attack controls.

How exp and nbf interact in validation

The exp claim sets the latest acceptable time for use, while nbf sets the earliest acceptable time. Together they create a window that should be evaluated using the token issuer's time basis and a narrow clock skew allowance, because distributed systems rarely agree perfectly to the second. Good validators treat both checks as mandatory and reject tokens that are outside the window instead of trying to be permissive.

This matters most when the token is used for access decisions that must remain current, such as short-lived API access, session assertions or delegated access flows. If the window is too wide, a captured token remains useful for longer than intended; if the validator is too tolerant of skew, it may silently extend acceptance beyond the policy the issuer intended.

Common failure modes in JWT date claims

The most common failure is partial validation, where a library or integration verifies the signature but omits one or both time claims. Another failure is relying on local system clocks without monitoring drift, which creates inconsistent acceptance across services. A third is issuing tokens with unnecessarily long lifetimes, which turns a missed revocation opportunity into a larger replay window.

These failures are especially damaging because they are easy to miss in normal testing. A token may appear to work in development even when nbf and exp handling is incomplete, then become a persistent bearer credential problem once the same token is reused across services or environments.

Validation design and token lifetime discipline

Validators should reject tokens that are not yet valid or that are expired, allow only a small and explicit skew, and treat lifetime length as a security decision rather than a convenience setting. When a system needs longer access, it is usually safer to reissue fresh tokens than to extend one token's usable period. Shorter lifetimes reduce the window for replay and limit the value of a stolen token.

NIST SP 800-57 Key Management is useful here because it formalises the idea that cryptographic material and related validity periods should be managed deliberately across their lifecycle, not left open-ended.

Risk and Threat Considerations

Ignoring exp or nbf turns a time-bound bearer token into a reusable credential with an unnecessarily long attack window. That increases the value of phishing, log leakage, browser storage theft and interception, because a copied token may remain valid even after the user believes the session should have ended.

Failure mechanism: The validator accepts a token outside its intended validity window, so an attacker who captures or replays it can continue using it until some other control intervenes.

Impact: Stolen tokens can be replayed for unauthorized access, session continuation and API abuse, and the breach window expands whenever lifetimes are long or clock skew is poorly controlled.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

OWASP API Security Top 10 addresses the attack and risk surface, while NIST SP 800-57, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-57Recommendation for Key ManagementAddresses cryptoperiods and time-bounded use of cryptographic material.
Recommendation — Set short token lifetimes and manage validity periods as part of the key lifecycle.
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementCovers lifecycle and secure handling of authenticators that depend on time-bounded validity.
Recommendation — Enforce expiration checks and limit bearer-token lifetime through authenticator management.
OWASP API Security Top 10API2 — Broken AuthenticationJWT time-claim failures weaken API authentication and permit replay of bearer tokens.
Recommendation — Validate JWT exp and nbf on every API request and reject tokens outside the valid window.
CIS Controls v8CIS-6 — Access Control ManagementSupports limiting reuse of credentials and access paths by enforcing time-bounded access.
Recommendation — Restrict token acceptance windows and remove long-lived bearer access paths.

Practitioner Guidance

Why practitioners should care: Time claims are one of the simplest JWT checks, but they are also one of the easiest to accidentally skip during integration. Treat them as mandatory acceptance criteria in every service that consumes the token, including gateways, APIs and downstream resource servers.

Common misunderstanding: Signature verification alone does not make a JWT safe to accept. A correctly signed token can still be stale, premature or replayable if date claims are not enforced consistently.

Practitioner takeaway: Keep token lifetimes short, monitor clock drift across validating systems and verify both claims on every path that accepts the JWT.

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.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org