When debugging a 401/403 incident, it is tempting to copy a live Authorization: Bearer eyJ... header into the first JWT decoder returned by search. If that site logs inputs or runs third-party trackers, you just leaked a valid production session token.
Because JWT headers and payloads are plain Base64URL JSON (not encrypted), inspecting and auditing them takes zero network calls.
1. Header Traps That Still Show Up in Audits
-
alg: "none": Always pin an explicit algorithm allowlist (e.g.,RS256,ES256) on the verifier rather than trustingheader.alg. -
RS256 -> HS256 Key Confusion: Passing a PEM public key into a verifier that accepts
HS256lets anyone forge tokens signed with the public key bytes. -
Unsanitized
kid/ Remotejkuยทx5u: Never interpolatekiddirectly into file paths or SQL queries, and block arbitrary remote key URLs.
2. Claim & Operational Footguns
-
Missing
expcreates tokens that stay valid forever if leaked. -
Missing
aud/issallows cross-service token replay inside shared IdP tenants. -
>4 KB JWT bloat (stuffing giant permission arrays into claims) triggers Nginx/CloudFront
431 Request Header Fields Too Largefailures.
3. Zero-Dependency Offline CLI & 0B-Upload Browser Inspector
I built a tiny zero-dependency MIT CLI (jwt-audit-cli, node --test passing) to decode and flag these issues locally, alongside client-side browser decoders that never send a byte over the network:
-
Open-Source CLI (
jwt-audit-cli, MIT): https://github.com/JangYS0/jwt-audit-cli - Browser JWT Decoder (0B upload): https://global-utils.com/en/jwt-decoder
- Browser JWK / PEM Key Inspector: https://global-utils.com/en/jwk-inspector
Top comments (0)