Intel

AIKIDO-2026-890544

urwid is vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)CVE-2026-9323 Published 3 days ago

81

High Risk

This Affects:

PYTHONurwid
0.8.0 - 4.0.0
Fixed in 4.0.1
Are you affected? Scan for Free

TL;DR

The web display backend in urwid/display/web.py generates web session identifiers in Screen.start() by concatenating two random.randrange values drawn from Python's non-cryptographic Mersenne Twister PRNG. The identifier is exposed through the X-Urwid-ID response header and is also used as the name of a FIFO created in the world-listable /tmp directory, so an attacker who observes enough identifiers can reconstruct the PRNG state and predict session tokens, while a local user can enumerate active tokens directly. With a valid session identifier an attacker can read the victim's terminal output, inject keystrokes into the session, and disrupt or crash it. The fix replaces the predictable identifier with a cryptographically secure random value.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and your application uses the urwid web display backend.

Background info

urwid is vulnerable to Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG) in versions 0.8.0 - 4.0.0.

How to fix this

Upgrade the urwid library to the patch version.