제출 #870672: man-group dtale <=3.22.0 Cryptographically Weak PRNG정보

제목man-group dtale <=3.22.0 Cryptographically Weak PRNG
설명When 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.
원천⚠️ https://github.com/man-group/dtale/issues/960
사용자
 ZAST.AI (UID 87884)
제출2026. 06. 26. AM 10:27 (2 개월 ago)
모더레이션2026. 08. 14. PM 08:57 (2 months later)
상태수락
VulDB 항목390086 [mangroup dtale 까지 3.22.0 Flask Session Cookie dtale/app.py build_secret_key 약한 암호화]
포인트들20

Do you need the next level of professionalism?

Upgrade your account now!