← back to room
JWT
JWT Attacks
Scenario
TokenGate stores a signed cookie gating access to admin routes. Legacy code accepts tokens whose header algorithm is set to none. Forge a cookie claiming admin role without a valid signature.
Your approach
- Capture your session JWT from browser storage or cookies.
- Decode header and payload; set alg to none and role to admin.
- Remove or empty the signature segment and re-submit the token.
- Access the protected admin action and read the bypass flag.
- Submit the alg-none flag.
The app trusts JWTs. Try alg:none, crack/forge with a weak HMAC secret, or tamper the role claim. Submit the token below to verify.
Your token
HS256 secret is a common English word (very short). Target payload: {"user":"hacker","role":"admin"}