You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now try to decode with a different secret with the value of verify set to anything except false. This will work allowing fake tokens to look like they were successfully verified
Current behavior
Currently when
jwt.decode()
get anoVerify
argument with ANY value except forfalse
the signature is not verified.Issue
This could be a problem if a developer is confused and passes a value like 'HS256' (the algorithm) instead of the
noVerify
boolean value, e.g.In this case the signature is not being verified, which could lead to authentication bypass.
Suggested Behavior
Signature verification is only skipped if the value of
noVerify
istrue
and is not skipped for any other value, e.g. a string like 'HS256'.Reproduction steps:
false
. This will work allowing fake tokens to look like they were successfully verifiedThe text was updated successfully, but these errors were encountered: