Taprico
Engineering & DevOps 5 min read · Updated November 2026

JWT Security Checklist: Avoiding alg:none, Weak Secrets & Expiry Bugs

A practical engineering audit list for preventing the most common JSON Web Token vulnerabilities in modern web apps and microservices.

Remember: Signing Is Not Encryption

A standard JWT uses JWS (JSON Web Signature). Anyone who intercepts an Authorization: Bearer header can Base64URL-decode the payload in milliseconds. Treat every claim inside a standard JWT as public metadata.

5 Mandatory Server-Side JWT Checks

Before trusting any user ID or role inside a token, confirm your authentication middleware enforces all five rules:

  • Whitelist allowed algorithms explicitly (e.g., algorithms: ["RS256"])—never trust the incoming header alg field blindly.
  • Reject tokens with alg: "none" at your API gateway or verification helper.
  • Verify iss (Issuer) and aud (Audience) claims so tokens from a staging tenant cannot access production.
  • Require an exp timestamp and keep access token lifetimes short (5–15 minutes).
  • Use high-entropy 256-bit+ secrets for HMAC (HS256) or rotate asymmetric keys via JWKS.

Inspect & Verify Tokens Without Uploading Secrets

Debug JWT headers, timestamps, and HS256 signatures right inside your browser Web Crypto engine.