Descrizione
A vulnerability was found in Keycloak. Expired OTP codes are still usable when using FreeOTP when the OTP token period is set to 30 seconds (default). Instead of expiring and deemed unusable around 30 seconds in, the tokens are valid for an additional 30 seconds totaling 1 minute.
A one time passcode that is valid longer than its expiration time increases the attack window for malicious actors to abuse the system and compromise accounts. Additionally, it increases the attack surface because at any given time, two OTPs are valid.
Tipo di vulnerabilità
CWE-324
Use of a Key Past its Expiration Date
The product uses a cryptographic key past its expiration date.
Impatto sui sistemi
| Ambito | Impatto |
| Controllo degli accessi |
Aggirare i meccanismi di protezione, Ottenere privilegi o assumere un’altra identità |
Come si previene
Architettura e progettazione
Adequate consideration should be put into the user interface in order to notify users previous to the key's expiration, to explain the importance of new key generation and to walk users through the process as painlessly as possible.
Sviluppo
Replace keys within a period of time proportional to their strength.
Tutte le 18 CVE di tipo CWE-324, con andamento e prevenzione