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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:10 | python3-urwid | 2.5.3-4.el10_2.5 | ALSA-2026:58561 |
| AlmaLinux:8 | python3-urwid | 1.3.1-5.el8_10 | ALSA-2026:58562 |
| AlmaLinux:9 | python3-urwid | 2.1.2-4.el9_8.1 | ALSA-2026:58952 |
| Debian:12 | urwid | 2.1.2-4+deb12u1 | DEBIAN-CVE-2026-9323 |
| Debian:13 | urwid | no fix listed | DEBIAN-CVE-2026-9323 |
| Debian:14 | urwid | 4.1.3-1 | DEBIAN-CVE-2026-9323 |
| Rocky Linux:10 | python-urwid | 0:2.5.3-4.el10_2.5 | RLSA-2026:58561 |
| Rocky Linux:8 | python-urwid | 0:1.3.1-5.el8_10 | RLSA-2026:58562 |
| Rocky Linux:9 | python-urwid | 0:2.1.2-4.el9_8.1 | RLSA-2026:58952 |
| Ubuntu:22.04:LTS | urwid | 2.1.2-2ubuntu0.1 | USN-8751-1 |
| Ubuntu:22.04:LTS | urwid | 2.1.2-2ubuntu0.1 | UBUNTU-CVE-2026-9323 |
| Ubuntu:24.04:LTS | urwid | no fix listed | UBUNTU-CVE-2026-9323 |
| Ubuntu:26.10 | urwid | no fix listed | UBUNTU-CVE-2026-9323 |
Affected products (as reported)
Weakness: CWE-338 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- GitHub Security Advisory (GHSA-rjwp-g85x-gmjv) vendor-advisory
- Product product
- Patch Commit patch
- GitHub Issue issue-tracking
- Pull Request issue-tracking
- https://www.vulncheck.com/advisories/insecure-prng-and-information-exposure-in-urwid-web-display-backend third-party-advisory
- https://lists.debian.org/debian-lts-announce/2026/09/msg00015.html