Lab: JWT authentication bypass via kid header path traversal
Summary: This PortSwigger lab demonstrates a JWT authentication bypass in which the server uses the kid header parameter to fetch a signing key from its filesystem. By pointing kid at /dev/null via a path traversal sequence and signing the token with an empty string as the symmetric key, the attacker changes the sub claim to administrator and reaches the /admin panel.
What's compelling: A single header field that the server trusts to locate a key file let a regular user, logged in as wiener, reach the admin panel and delete the user carlos. Any application that resolves signing keys from user-influenced input inherits that same path traversal exposure.
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