jwt-security-review
Audit JSON Web Token implementations for algorithm confusion, weak secrets, missing validation, and token lifecycle flaws. Use when a codebase or API uses JWTs for auth.
v2026.8.26-b2b6b523 instalações+3 em 7 dias0 Estrelassincronizado há 19 horas
Instalar
Ainda não tem a CLI da NotHoly? Instale primeiro.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install securityskills/jwt-security-reviewGrava em ~/.notholy/skills depois de conferir a assinatura e o SHA-256.
AssinaturaAssinado, ed25519
Pacote8035307e…682e4b56
8035307e5be1…b81e682e4b561 arquivo · 1.3 KBVarreduraMédio1 achado
- Nenhuma licença encontrada
Fontegithub.com/securityskills/skills/tree/main/web-appsec/auth/jwt-security-review@b2b6b52
Este item ainda não foi escrito no seu idioma, então aparece em English.
Nesta página
Review JWT-based authentication end to end.
Review Areas
Algorithm Handling
- Pin the expected algorithm server-side; reject
alg: noneoutright - RS256→HS256 confusion: if the server verifies HMAC using the public key as the secret, an attacker can forge tokens. Confirm verification uses the correct key type per algorithm
- Watch for
jku/x5uheader injection where the server fetches keys from an attacker-controllable URL kidinjection: path traversal or SQL/Command injection in key lookup
Key and Secret Strength
- HS256 secrets: ≥32 bytes of entropy, not from wordlists (
jwt-toolscrack mode) - Keys rotated; old keys revoked rather than just unused
Claims Validation
expandnbfenforced, clock skew boundedissandaudvalidated against expected values- Reject tokens with unexpected/extra privileged claims (e.g.,
admin: true) — parse then validate allowlist - Don't trust client-controlled
role/uidclaims if a server-side lookup exists
Token Lifecycle
- Refresh tokens: rotation with reuse detection; stored hashed server-side
- Revocation path exists for logout/password change/admin force-logout
- Access tokens short-lived (≤15 min); no long-lived bearer tokens
- Tokens not persisted in localStorage if XSS surface exists; prefer httpOnly cookies with CSRF protection
subis stable and unambiguous (user ID, not email that can change)
Common Code Smells
jwt.decode(token) // decode ≠ verify: signature never checked
jwt.verify(token, key) // no algorithms option pinned
jwt.verify(token, key, { algorithms: ['*'] })Test Cases
- Remove the signature; send
alg: nonetoken - Flip
algto HS256 signed with the public key - Expired/missing
exp, wrongiss/aud - Tampered claims with valid signature (e.g., escalate role)
- Replay a rotated refresh token — should invalidate the family
Output
Findings with token samples (redacted), affected code paths, and remediation per issue.
Arquivos desta versão
- SKILL.md2.2 KB
Permissões
| Permissão | Declarada | Encontrada na varredura |
|---|---|---|
| Lê arquivos | Não | Não |
| Grava arquivos | Não | Não |
| Roda comandos no shell | Não | Não |
| Usa a rede | Não | Não |
| Usa conectores | Não | Não |
| Controla um navegador | Não | Não |
Achados da varredura
Revisado em 13 de nov. de 2026
- MédiaLicença · Nenhuma licença encontrada
Uma varredura limpa reduz o risco, mas não prova que o pacote é seguro. Leia o que você instala.
| Versão | Publicada em | Commit | SHA-256 | Assinatura | Mudança de permissão |
|---|---|---|---|---|---|
| v2026.8.26-b2b6b52 | 13 de nov. de 2026 | b2b6b52 | 8035307e | Assinada | – |
Mais de securityskills
Tudo deste publicadorMais em APIs, SaaS e identidade
Ver a categoria- testing-for-sensitive-data-exposuremukul975/testing-for-sensitive-data-exposure5
- performing-jwt-none-algorithm-attackmukul975/performing-jwt-none-algorithm-attack5
- sharp-edgestrailofbits/sharp-edges4
- hydraaeondave/hydra4
- implementing-google-workspace-admin-securitymukul975/implementing-google-workspace-admin-security4
- implementing-api-security-posture-managementmukul975/implementing-api-security-posture-management4
Pergunte tudo o que o seu escopo permite.
Crie a conta, adicione créditos e faça a primeira pergunta no chat ou no terminal.
- 1/3
Crie a conta
Individual ou empresa. Dá para virar empresa depois sem perder saldo nem chaves.
Pessoa físicaEmpresa - 2/3
Adicione créditos
No cartão. Você paga por token, sem assinatura.
$5.00recarga mínima - 3/3
Pergunte
No chat, ou instale o CLI e rode notholy login no terminal.
$ notholy login