Saltar al contenido
Nuevo

DeepSeek V4.1 Flash gratis por 7 días: 10M tokens al día tras una recarga de $10 o más. Hasta el 30/11.

Cómo funciona
securityskills/jwt-security-reviewAPIs, SaaS e identidad

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 instalaciones+3 en 7 días0 Estrellassincronizado hace 19 horas

Instalar

¿Aún no tienes la CLI de NotHoly? Instálala primero.

$ curl -fsSL https://notholy.com/install.sh | sh
$ notholy skills install securityskills/jwt-security-review

Escribe en ⁦~/.notholy/skills⁩ después de comprobar la firma y el SHA-256.

FirmaFirmado, ed25519
t8lW4e6K1l…VKfGwcBg==La CLI comprueba el SHA-256 y la firma antes de escribir cualquier archivo.
Paquete8035307e…682e4b56
8035307e5be1…b81e682e4b561 archivo · ⁦1.3 KB⁩
EscaneoMedio1 hallazgo
  • No se encontró licencia
Ver el escaneo completo
Fuentegithub.com/securityskills/skills/tree/main/web-appsec/auth/jwt-security-review@b2b6b52

Esta entrada todavía no está escrita en tu idioma, así que aparece en English.

Review JWT-based authentication end to end.

Review Areas

Algorithm Handling

  • Pin the expected algorithm server-side; reject alg: none outright
  • 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/x5u header injection where the server fetches keys from an attacker-controllable URL
  • kid injection: path traversal or SQL/Command injection in key lookup

Key and Secret Strength

  • HS256 secrets: ≥32 bytes of entropy, not from wordlists (jwt-tools crack mode)
  • Keys rotated; old keys revoked rather than just unused

Claims Validation

  • exp and nbf enforced, clock skew bounded
  • iss and aud validated against expected values
  • Reject tokens with unexpected/extra privileged claims (e.g., admin: true) — parse then validate allowlist
  • Don't trust client-controlled role/uid claims 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
  • sub is stable and unambiguous (user ID, not email that can change)

Common Code Smells

text
jwt.decode(token)            // decode ≠ verify: signature never checked
jwt.verify(token, key)       // no algorithms option pinned
jwt.verify(token, key, { algorithms: ['*'] })

Test Cases

  1. Remove the signature; send alg: none token
  2. Flip alg to HS256 signed with the public key
  3. Expired/missing exp, wrong iss/aud
  4. Tampered claims with valid signature (e.g., escalate role)
  5. Replay a rotated refresh token — should invalidate the family

Output

Findings with token samples (redacted), affected code paths, and remediation per issue.

Archivos de esta versión

Permisos

PermisoDeclaradoHallado en el escaneo
Lee archivosNoNo
Escribe archivosNoNo
Ejecuta comandos de shellNoNo
Usa la redNoNo
Usa conectoresNoNo
Controla un navegadorNoNo

Hallazgos del escaneo

Revisado el 13 nov 2026

  1. MediaLicencia · No se encontró licencia

Un escaneo limpio baja el riesgo, pero no prueba que el paquete sea seguro. Lee lo que instalas.

VersiónPublicadaCommitSHA-256FirmaCambio de permisos
v2026.8.26-b2b6b5213 nov 2026b2b6b528035307eFirmada–

Pregunta todo lo que tu alcance permite.

Crea la cuenta, añade créditos y haz la primera pregunta en el chat o en la terminal.

  1. 1/3

    Crea la cuenta

    Individual o empresa. Puedes pasar a empresa después sin perder saldo ni claves.

    IndividualEmpresa
  2. 2/3

    Añade créditos

    Con tarjeta. Pagas por token, sin suscripción.

    $5.00recarga mínima
  3. 3/3

    Pregunta

    En el chat, o instala el CLI y ejecuta notholy login en tu terminal.

    $ notholy login