Skip to content

In-depth lesson · JWT flaws

Tips for beginners

Every point the JWT flaws reports back under this heading, best-backed first, each with the reports it is seen in.

Back to the lesson 1 to 11 of 11
  1. Test whether changing the user identifier claim inside a JWT grants access to another account. This is a common IDOR vector.

    Seen in 4 reports
  2. Start by mapping authentication and authorisation flows: login, password reset, SSO, account linking and integrations. Look for places where a JWT is issued, stored or passed in a URL. The reports here show these flows are common targets.

    Seen in 3 reports
  3. Test whether the server verifies the JWT signature. Try altering the signature or using a token signed with a different key. Also test expired tokens and tokens with modified claims.

    Seen in 3 reports
  4. When you find a JWT flaw, demonstrate impact clearly. Show that you can access another user's data, escalate privileges or take over an account. Avoid reporting theoretical issues without proof.

    Seen in 3 reports
  5. Make sure the target is in scope. JWT flaws in third-party integrations or components may be out of scope for the programme. Check the programme's policy before testing.

    Seen in 2 reports
  6. Inspect client-side JavaScript for hardcoded secrets or signing keys. If you find a JWT signing secret in client-side code, check whether you can forge tokens and whether the server accepts them.

    Seen in 1 report
  7. Check for algorithm confusion: if the service uses RSA, try signing an HS256 token with the public key as the HMAC secret. If accepted, that is a serious flaw.

    Seen in 1 report
  8. Look for default or empty signing keys. If a key file is empty or a default value is used, you may be able to forge tokens. The evidence includes an empty join key that defaulted to a fixed value.

    Seen in 1 report
  9. Test password reset and email verification flows for tokens that are not bound to the session. Try to obtain a token for a victim and use it with your own OTP or session.

    Seen in 1 report
  10. Look for exposed endpoints that mint JWTs. If you can call such an endpoint to obtain a token for another user, that is a critical finding.

    Seen in 1 report
  11. Combine JWT flaws with other weaknesses such as missing rate limiting, IDOR or SSRF to increase impact. The evidence shows chains leading to account takeover and remote code execution.

    Seen in 1 report