Vulnerability · Published Jul 18, 2026 · Assigned by VulnCheck

CVE-2026-9323Insecure PRNG and Information Exposure in urwid Web Display Backend

High 8.1

In plain English

A high-severity security flaw in urwid from urwid. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.7% (higher than 54% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.1High
Exploit odds (30 days)0.7%top 46.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official 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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:10python3-urwid2.5.3-4.el10_2.5ALSA-2026:58561
AlmaLinux:8python3-urwid1.3.1-5.el8_10ALSA-2026:58562
AlmaLinux:9python3-urwid2.1.2-4.el9_8.1ALSA-2026:58952
Debian:12urwid2.1.2-4+deb12u1DEBIAN-CVE-2026-9323
Debian:13urwidno fix listedDEBIAN-CVE-2026-9323
Debian:14urwid4.1.3-1DEBIAN-CVE-2026-9323
Rocky Linux:10python-urwid0:2.5.3-4.el10_2.5RLSA-2026:58561
Rocky Linux:8python-urwid0:1.3.1-5.el8_10RLSA-2026:58562
Rocky Linux:9python-urwid0:2.1.2-4.el9_8.1RLSA-2026:58952
Ubuntu:22.04:LTSurwid2.1.2-2ubuntu0.1USN-8751-1
Ubuntu:22.04:LTSurwid2.1.2-2ubuntu0.1UBUNTU-CVE-2026-9323
Ubuntu:24.04:LTSurwidno fix listedUBUNTU-CVE-2026-9323
Ubuntu:26.10urwidno fix listedUBUNTU-CVE-2026-9323

Affected products (as reported)

VendorProductVersions
urwid urwid 0 – through 24acd12

Weakness: CWE-338 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

References