Intel

AIKIDO-2026-890544

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

CVE-2026-9323Published Jul 24, 2026
July 24, 2026

81

CVE Score

High

Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)

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.

How do I fix this?

Upgrade the urwid library to the patch version.

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.

Package

Versions

0.8.0 - 4.0.0

Fixed in 4.0.1

Background info

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

Get secure today,
quickly and for free.

Secure your code, cloud, and runtime in one central system. Connect a repo to discover what the reasoning agents find in your codebase.

No credit card required | Scan results in 32 seconds.

Trusted by 150k+ orgs
  • Revolut
  • n8n
  • Lovable
  • Deel
  • Prove
  • Omnea