Join our Newsletter — 33% off our NHI Course
Home› Glossary› Authentication, Authorisation & Trust› Insecure JSON Web Tokens (JWT)
Authentication, Authorisation & Trust

Insecure JSON Web Tokens (JWT)

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

Insecure JSON Web Tokens (JWT) are tokens that can be forged, replayed, or misused because they are signed, validated, or handled incorrectly. Common failures include weak algorithms, missing expiry checks, and accepting tokens from untrusted issuers. Defenders should validate signature, issuer, audience, expiry, and token lifecycle controls strictly.

How insecure JWTs fail

JWTs become insecure when the token’s integrity or validity assumptions break. That usually means a verifier trusts a token it should not, or an attacker can alter claims, reuse a token, or present one that was never meant for the current service or user flow.

These failures are dangerous because JWTs often act as portable bearer credentials. If the token is accepted without strict checks, the application may treat an attacker as authenticated even though the token was forged, replayed, or issued for a different context.

Common validation mistakes

The most common problems are predictable: accepting weak or unexpected algorithms, skipping signature verification, failing to check issuer and audience, and ignoring token expiry. A token can also become insecure when the application treats it as valid far beyond its intended lifetime.

Another recurring mistake is confusing token parsing with token verification. A system can successfully decode a JWT and still be completely unsafe if it never proves the signature, the token source, and the intended recipient before using the claims.

Why JWT misuse creates access risk

JWT misuse often turns a normal authentication control into a durable access path. Because claims are portable, a single leaked or accepted-for-granted token can expose sessions, API access, or privilege-bearing actions across multiple services.

This is especially risky in distributed systems where the same token may be reused across gateways, microservices, and user-facing applications. If audience scoping, issuer trust, or replay resistance is weak, a token stolen in one context can become valid in another.

What secure JWT handling looks like

Secure handling starts with strict verification of signature, issuer, audience, and expiry before any claim is trusted. That baseline should be paired with narrow token lifetimes, explicit revocation or rotation strategy, and careful control over where tokens are stored and transmitted.

For token lifecycle and replay protection, practitioners should treat JWTs as part of broader access-token hygiene, not as a one-time coding detail. NHI Management Group’s Token and Session Security Guide explains how JWTs, access tokens, and session cookies should be protected against replay, theft, and misuse, while API Key Management Guide covers the same lifecycle discipline for bearer-style credentials that fail when they are overexposed or left unrevoked.

When JWTs are used in service-to-service or workload flows, Guide to SPIFFE and SPIRE is useful for understanding how stronger workload identity and trust-bound credentials reduce reliance on loosely handled bearer tokens.

Risk and Threat Considerations

Insecure JWT handling creates an immediate authentication and session-risk problem because a forged or replayed token can bypass normal login controls. The impact is often wider than a single account, since the same flawed validation path may exist across many services or APIs.

Failure mechanism: The application trusts token claims without proving the token’s authenticity, intended audience, issuer, or freshness, which lets attackers reuse stolen tokens or mint ones the verifier should reject.

Impact: Attackers can gain unauthorized access, impersonate users or services, move laterally across connected systems, and preserve access until the token expires or is explicitly revoked.

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-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementJWT handling depends on token lifecycle, expiry, and revocation discipline.
IA-2 — Identification and Authentication (Organizational Users)JWTs often function as user authentication artifacts that must be verified before trust.
Recommendation — Enforce token issuance, expiry, rotation, and revocation rules for every JWT-bearing workflow. Require authenticated users to present only verified tokens before granting access.
OWASP ASVSV7 — Session ManagementJWT misuse commonly becomes a session integrity problem through replay and overlong validity.
V10 — OAuth and OIDCJWTs are often used in OAuth/OIDC flows where issuer, audience, and token trust are critical.
Recommendation — Validate token freshness and session-binding assumptions before accepting JWT-based sessions. Check issuer, audience, and token handling rules in OAuth and OIDC implementations.
OWASP API Security Top 10API2 — Broken AuthenticationImproper JWT verification is a common API authentication failure mode.
Recommendation — Harden API token verification so forged or replayed JWTs are rejected.

Practitioner Guidance

What to watch for: Review any JWT implementation that accepts tokens from multiple issuers, uses long-lived tokens, or relies on client-side storage without additional replay resistance. Those patterns are where insecure validation and token theft usually become exploitable.

Governance implication: JWT verification rules should be owned as a security control, not left as ad hoc application logic. Teams should standardise issuer, audience, expiry, and rotation requirements so that every service validates tokens the same way.

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 October 20, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org