Skip to content

Quiz: JWT

Review first: JWT

#

Question 1

A JWT verifier you're reviewing accepts whatever algorithm the token's alg header declares, including "none" and HS256 — while the IdP signs with RS256. What attack does this enable? Select ALL that apply:

#

Question 2

Your SPA stores JWT access tokens in localStorage "so they survive reloads". A pentester flags this. Why?

#

Question 3

Your microservices all verify JWTs with a shared HS256 secret stored in each service's config. An architect suggests RS256 instead. What's the actual improvement?

#

Question 4

A service signs HS256 tokens with the secret changeme123. The tokens are never exposed publicly — only to logged-in users. How exploitable is this?

#

Question 5

A verifier checks the signature and exp, but ignores aud and iss. Your IdP issues tokens to several APIs. What's the realistic attack?

#

Question 6

An attacker stole a user's JWT access token (1-hour exp). The user resets their password. Which measures actually cut off the stolen token before it expires? Select ALL that apply: