The Hacker’s Guide to JWT Security
summary
Live demos show concrete exploits: creating a non-alg JWT bypass because the app uses io.jsonwebtoken parse instead of parseClaimsJws (v0.9.1 vulnerable, fixed in 0.12 Oct 2023); offline cracking of an HS256 secret with hashcat on four Tesla GPUs (~4 billion hashes/sec) to forge tokens; TCP dump of unencrypted internal traffic to grab valid tokens; and XSS that posts sessionStorage tokens via an image src to an attacker server. Recommendations: strong keys, short access lifetimes with refresh tokens, encrypted every internal leg, and server-side token revocation.
AI-written summary · about
