Skip to content
RED SAGSkills
hard20 pts · first answer countsjwtsecurity

JWT verified with an attacker-chosen algorithm

Your API verifies RS256 tokens using the public key, but its verify call accepts whatever algorithm the token header says. An attacker sends a token with alg HS256, signed with your public key as the HMAC secret. How do you stop this?

Choose one answer