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
- Attackers Exploit UnrealIRCd Flaw That Enables Server-Level Command Injection Cyber Risks · Nov 14, 2026U.S. CISA adds Check Point and UnrealIRCd flaws to its Known Exploited Vulnerabilities catalog Cyber Risks · Nov 14, 2026PostgreSQL Patches 52 Flaws, Including 22-Year-Old Bug Enabling Authenticated RCE Cyber Risks · Nov 13, 2026