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?
Discussion 0
Join free to post in the discussion.
Related questions
- Stopping SQL injectionBackend Developer
- How to store passwordsBackend Developer
- Keeping secrets out of codeBackend Developer
- Database user for the appBackend Developer
- Stack traces in production errorsBackend Developer
- The three parts of a JWTBackend Developer
- Building SQL from user inputBackend Developer
- What RabbitMQ vhosts are forBackend Developer