Descrizione
nest-admin before 1.0.1 contains an authentication bypass vulnerability that allows unauthenticated attackers to forge administrator tokens by using a hardcoded JWT_SECRET committed in .env.production. Attackers can sign tokens with the known secret that JwtStrategy and RbacGuard trust, impersonating any user ID or claiming the admin role for full administrative access.
Tipo di vulnerabilità
CWE-321
Use of Hard-coded Cryptographic Key
The product uses a hard-coded, unchangeable cryptographic key.
Impatto sui sistemi
| Ambito | Impatto |
| Controllo degli accessi |
Aggirare i meccanismi di protezione, Ottenere privilegi o assumere un’altra identità, Leggere i dati dell’applicazione |
Come si previene
Architettura e progettazione
Prevention schemes mirror that of hard-coded password storage.
Tutte le 319 CVE di tipo CWE-321, con andamento e prevenzione