
🚨Critical - urwid Web Display Backend Session Prediction & Hijack (CVE-2026-9323) urwid's web display backend generates web session IDs by concatenating two random.randrange(10**9) calls from Python's Mersenne Twister PRNG, which is not cryptographically secure. By observing ~334 session IDs (e.g. via the X-Urwid-ID header), an attacker can reconstruct the PRNG state and predict all past and future session IDs. The same ID is also the filename of a FIFO in world-listable /tmp, so any local user can enumerate active tokens. With a valid session ID, an attacker can read the victim's terminal, inject keystrokes (OS-level code execution if the session runs a shell), and crash the session. A prior Bandit S311 warning had been suppressed with # noqa rather than fixed. Only urwid's optional web display backend is affected, not standard terminal TUIs. CVSS 9.2. 👉Update urwid to the release containing fix commit 24acd12 (PR #1128).
Post summary
The post describes the session ID prediction vulnerability in urwid’s web display backend (CVE‑2026‑9323), outlines its exploitation potential, and recommends patching to a release containing commit 24acd12.

