Invia #870672: man-group dtale <=3.22.0 Cryptographically Weak PRNGinformazioni

Titoloman-group dtale <=3.22.0 Cryptographically Weak PRNG
DescrizioneWhen authentication is enabled, D-Tale protects its routes via a Flask session cookie. After a successful login the server stores session["logged_in"] = True and session["username"], and the requires_auth decorator authorizes every subsequent request solely by reading those two session values. Flask session cookies are client-side, integrity-protected only by an HMAC keyed with the application's SECRET_KEY. D-Tale generates that SECRET_KEY at process startup with build_secret_key(), which selects 10 characters from an alphabet of only 36 symbols (A–Z and 0–9) using numpy.random.choice. This yields a key space of 36^10 ≈ 3.66 × 10^15 ≈ 2^51.7, compared to Flask's recommended os.urandom(24) (≈ 2^192). Two compounding weaknesses: Low entropy — 2^51.7 is brute-forceable offline. At ~10^10 HMAC verifications/second (commodity GPU cluster) the average time to recover the key is ≈ 2.1 days; lower-end hardware is in the order of days to a couple of weeks. Each candidate key is testable offline against a single captured cookie (no further interaction with the server). Weak PRNG — numpy.random (Mersenne Twister) is not a cryptographically secure RNG. Its internal state is recoverable from outputs, and it is not intended for secret generation, further weakening the practical search. Any unauthenticated client receives a signed (unauthenticated) session cookie simply by visiting /login. The attacker uses that cookie as an offline oracle to recover SECRET_KEY, then mints a cookie carrying {"logged_in": true, "username": "admin"}, signed with the recovered key. The requires_auth decorator accepts it. The password is never needed — this bypasses authentication entirely, regardless of password strength or any rate-limiting that may be added to the login form.
Fonte⚠️ https://github.com/man-group/dtale/issues/960
Utente
 ZAST.AI (UID 87884)
Sottomissione26/06/2026 10:27 (2 mesi fa)
Moderazione14/08/2026 20:57 (2 months later)
StatoAccettato
Voce VulDB390086 [mangroup dtale fino a 3.22.0 Flask Session Cookie dtale/app.py build_secret_key cifratura debole]
Punti20

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!