Web Security · Senior · Question 33 of 75

What is the JWT algorithm confusion attack (RS256 to HS256)?

Explanation

If the library picks the algorithm from the token header, the public key becomes a shared secret. Pin the expected algorithm per key.

Further reading

Problem with a question

Web Security · Senior · question 33

Test yourself

Take the Web Security · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz