Descrizione
NextAuth.js is a complete open source authentication solution for Next.js applications. An information disclosure vulnerability in `next-auth` before `v4.10.2` and `v3.29.9` allows an attacker with log access privilege to obtain excessive information such as an identity provider's secret in the log (which is thrown during OAuth error handling) and use it to leverage further attacks on the system, like impersonating the client to ask for extensive permissions. This issue has been patched in `v4.10.2` and `v3.29.9` by moving the log for `provider` information to the debug level. In addition, we added a warning for having the `debug: true` option turned on in production. If for some reason you cannot upgrade, you can user the `logger` configuration option by sanitizing the logs.
Tipo di vulnerabilità
CWE-532
Informazioni sensibili scritte nei file di log
Il prodotto scrive informazioni sensibili in un file di log.
Impatto sui sistemi
| Ambito | Impatto |
| Riservatezza |
Leggere i dati dell’applicazione Registrare nei log dati sensibili degli utenti, percorsi completi o informazioni di sistema offre spesso all’attaccante una via in più, e meno protetta, per ottenerli. |
Come si previene
Architettura e progettazione · Sviluppo
Valuta con attenzione la sensibilità delle informazioni scritte nei file di log. Non scrivere mai segreti nei log.
Distribuzione
Elimina i file di log di debug prima di mettere l’applicazione in produzione.
Esercizio
Proteggi i file di log da letture e scritture non autorizzate.
Sviluppo
Adegua la configurazione quando il software passa dalla modalità di debug alla produzione.
Tutte le 1.330 CVE di tipo CWE-532, con andamento e prevenzione