high · M3 · MASVS-AUTH-1 · PTKD-API-WEAK-JWT
Weak JWT observed on the wire
A JSON Web Token seen in traffic used alg=none (unsigned, trivially forgeable) or carried no expiry, weakening session security.
How it is exploited
A JSON Web Token seen in traffic used alg=none (unsigned) or carried no expiry. An unsigned token can be rewritten to impersonate any user; a token without exp stays valid forever once stolen.
Why it matters
Authentication bypass or indefinite session hijacking, depending on which weakness is present.
How to fix it
- Reject alg=none server-side and sign tokens with a strong algorithm (for example, RS256 or ES256).
- Always set a short exp and validate signature and expiry on every request.
Does your app have this?
PTKD checks your build or your source project for PTKD-API-WEAK-JWT and every other check in this knowledge base.
Scan your appReferences
Related checks (M3)
- Permissive CORS with credentials
- State-changing request succeeded without authentication
- Biometric authentication not bound to a cryptographic key
- Premium access is stored on the phone and trusted (heuristic)
- Firebase rules trust an email address nobody verified
- Firebase security rules open to everyone
- Users can make themselves admin or premium in Firestore
- Supabase auth settings in the local config (check the hosted project)