Definition
A JSON Web Token carries claims and a signature. Algorithm confusion arises when the verifying party lets the token itself influence how verification happens, rather than deciding that in advance and refusing anything else.
How the failure works
- 01The application reads the algorithm declared in the token header
- 02It selects a verification routine based on that declaration
- 03An attacker supplies a token declaring a different method
- 04Verification succeeds against a key or process that was never meant to authorize this token
- 05The application accepts the claims inside, including identity and role
The consequence is not a malformed request. It is a request that arrives fully authenticated as somebody else.
- Attacker
- Forged Token
- API
- Privileged Function
- Sensitive Data
Each hop validated by successful exploitation
Tags
- jwt
- authentication
- authorization