Skip to content
Threat Brief

← All advisories

CVE-2026-9323

Critical 9.2No known exploitationFix available

Insecure PRNG and Information Exposure in urwid Web Display Backend

Record last updated

CVSS score

9.2

Critical on a 0 to 10 scale

EPSS, chance of exploitation in 30 days

0.7%

Higher than 55% of scored CVEs. A prediction, not evidence.

CISA remediation deadline

None

Not in the KEV catalog

Description

The urwid web display backend (urwid/display/web.py) generates web session identifiers (urwid_id) in Screen.start() by concatenating two random.randrange(10**9) calls that use Python's Mersenne Twister PRNG, which is not cryptographically secure. Each call consumes approximately 30 bits of PRNG state, and the Mersenne Twister internal state is approximately 19,937 bits, so an attacker who observes approximately 334 session IDs (for example via the X-Urwid-ID HTTP response header) can fully reconstruct the internal state and predict all past and future session IDs (Path B). The same identifier is also used as the filename of a FIFO created in the world-listable /tmp directory (for example /tmp/urwid375487765176907690.in), so any local user on the host can list /tmp to enumerate active session tokens directly (Path A). With a valid session ID, an attacker can read the victim's terminal screen via the polling endpoint, inject keystrokes into the victim's session (yielding OS-level code execution with the session owner's privileges if the session runs a shell), and inject exit sequences or flood the FIFO to terminate or crash the session. A prior Bandit S311 warning on this usage was suppressed with # noqa: S311 rather than fixed

Weakness: CWE-338

Patching and mitigation

Patch status
Fix available (source: CVE record (VulnCheck))
Fix documented (source date)
Mitigation
None documented
Vendor guidance
github.com (opens in a new tab)

Affected products

VendorProductAffected versionsFixed inPer
urwidurwidall versions before 5.1.05.1.0CVE Program

Timeline

  1. Disclosure

    CVE record published by VulnCheck

    Source: CVE Program (opens in a new tab)

  2. Patch

    Fix documented by CVE record (VulnCheck)

    Source: CVE record (VulnCheck) (opens in a new tab)

Vendor guidance and references