Cyber Risks · PortSwigger Research

Lab: JWT authentication bypass via weak signing key

Summary: PortSwigger's lab demonstrates a JWT authentication bypass in which the application signs and verifies session tokens with an extremely weak secret key that can be brute-forced from a wordlist of common secrets. Following the walkthrough, hashcat reveals the key as secret1, which is then used to sign a modified token with the sub claim changed to administrator, granting access to /admin and the endpoint to delete the user carlos.

What you should know: A signing key drawn from a common-secrets wordlist means anyone who captures a single token can recover the key and mint an administrator session, turning one leaked JWT into full control of the admin panel.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related