security
auth_error
ai_generated
true
JWT validation bypass: algorithm confusion attack
ID: security/jwt-algorithm-confusion
82%Fix Rate
86%Confidence
3Evidence
2023-01-01First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| any | active | — | — | — |
Root Cause
JWT algorithm can be changed by attacker to bypass signature.
genericWorkarounds
-
92% success Explicitly specify allowed algorithms in verification: algorithms=["RS256"]
-
90% success Reject tokens with alg:none or unexpected algorithms
Dead Ends
Common approaches that don't work:
-
Accept any algorithm in JWT header
92% fail
Algorithm confusion attack vector
-
Use symmetric key same as public key
88% fail
Key confusion vulnerability