A login token that anyone can forge (JWT "alg:none")
An unsigned token was found in the example JavaScript. Server acceptance was not tested.
Why it matters
We found a JSON Web Token (the thing that proves a user is logged in) that is marked "alg":"none" — meaning it carries NO signature at all. A signature is what stops someone hand-editing a token to say "I am the admin". If your server accepts unsigned tokens like this one, anyone can craft a token for any user and walk straight in. We did not send or test it anywhere — we only read it from your code.
Evidence
Example /assets/app.js — JWT header: { "alg": "none" }. Token: [redacted].Confidence & verification
Confidence was not provided by this detector. Severity is not proof of exploitability.
How to fix · generic
1) Find where tokens are verified. 2) Pin the algorithm: pass an explicit allow-list (e.g. algorithms: ["HS256"]) to your JWT verify function and never trust the "alg" from the token header. 3) Confirm a token with "alg":"none" is rejected. 4) Rotate your signing secret/keys if unsigned tokens may have been accepted.
Example code · jsonwebtoken (Node)
Always pass an explicit algorithms allow-list — this is what rejects "alg:none".
import jwt from "jsonwebtoken";
// ❌ Vulnerable: no algorithms list — "alg":"none" tokens slip through
const claims = jwt.verify(token, secret);
// ✅ Fixed: pin the algorithm; an unsigned/none token is rejected
const claims = jwt.verify(token, secret, { algorithms: ["HS256"] });Verify the change
Apply the fix, then run another scan with the same scope. Review the evidence and check coverage. This report is a snapshot; copying a fix or starting a scan does not mark the issue as fixed.