CVE-2026-9323Insecure PRNG and Information Exposure in urwid Web Display Backend
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
What to do
Fixed builds are available from AlmaLinux, Debian, Red Hat, Rocky Linux, Ubuntu: see the table below for the fixed version per release.
Debian, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | urwid | Fixed | 3.0.4-1ubuntu0.26.10.1 | UBUNTU-CVE-2026-9323 |
| Ubuntu 26.04 | urwid | Fix pending | 3.0.4-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-9323 |
| Ubuntu 24.04 | urwid | Fixed | 2.6.10-1ubuntu0.1 | UBUNTU-CVE-2026-9323 |
| Ubuntu 22.04 | urwid | Fixed | 2.1.2-2ubuntu0.1 | UBUNTU-CVE-2026-9323 |
| Ubuntu 20.04 | urwid | Fix pending | 2.0.1-3ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-9323 |
| Ubuntu 18.04 | urwid | Fix pending | 2.0.1-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2026-9323 |
| Ubuntu 16.04 | urwid | Fix pending | 1.3.1-2ubuntu0.1~esm2 (Ubuntu Pro) | UBUNTU-CVE-2026-9323 |
| Debian 14 | urwid | Fixed | 4.1.3-1 | DEBIAN-CVE-2026-9323 |
| Debian 13 | urwid | Fix pending | DEBIAN-CVE-2026-9323 | |
| Debian 12 | urwid | Fixed | 2.1.2-4+deb12u1 | DEBIAN-CVE-2026-9323 |
| Red Hat Enterprise Linux 10 | python-urwid | Fixed | 0:2.5.3-4.el10_2.5 | RHSA-2026:58561 |
| Red Hat Enterprise Linux 10 | python3-urwid | Fixed | 0:2.5.3-4.el10_2.5 | RHSA-2026:58561 |
| Red Hat Enterprise Linux 9 | python-urwid | Fixed | 0:2.1.2-4.el9_8.1 | RHSA-2026:58952 |
| Red Hat Enterprise Linux 9 | python3-urwid | Fixed | 0:2.1.2-4.el9_8.1 | RHSA-2026:58952 |
| Red Hat Enterprise Linux 8 | python-urwid | Fixed | 0:1.3.1-5.el8_10 | RHSA-2026:58562 |
| Red Hat Enterprise Linux 8 | python3-urwid | Fixed | 0:1.3.1-5.el8_10 | RHSA-2026:58562 |
| Red Hat Enterprise Linux 7 | python-urwid | Will not fix Out of support scope | ||
| Red Hat Enterprise Linux 6 | python-urwid | Will not fix Out of support scope | ||
| AlmaLinux 10 | python3-urwid | Fixed | 2.5.3-4.el10_2.5 | ALSA-2026:58561 |
| AlmaLinux 9 | python3-urwid | Fixed | 2.1.2-4.el9_8.1 | ALSA-2026:58952 |
| AlmaLinux 8 | python3-urwid | Fixed | 1.3.1-5.el8_10 | ALSA-2026:58562 |
| Rocky Linux 10 | python-urwid | Fixed | 0:2.5.3-4.el10_2.5 | RLSA-2026:58561 |
| Rocky Linux 9 | python-urwid | Fixed | 0:2.1.2-4.el9_8.1 | RLSA-2026:58952 |
| Rocky Linux 8 | python-urwid | Fixed | 0:1.3.1-5.el8_10 | RLSA-2026:58562 |
What the vendor says
As published in the CVE record by VulnCheck, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- urwid: affected: before 5.1.0; fixed in
5.1.0
Vendor advisories:
- https://github.com/urwid/urwid/security/advisories/GHSA-rjwp-g85x-gmjv (vendor-advisory)
- https://github.com/urwid/urwid/security/advisories/GHSA-xm5p-pwm6-5w65 (vendor-advisory)
- https://github.com/urwid/urwid/commit/24acd12f0d0598036d0d577f2ee63e4a27b4a3d9 (patch)
- https://github.com/urwid/urwid/pull/1128 (patch)
References
- https://github.com/urwid/urwid/security/advisories/GHSA-rjwp-g85x-gmjv
- https://github.com/urwid/urwid/security/advisories/GHSA-xm5p-pwm6-5w65
- https://github.com/urwid/urwid
- https://github.com/urwid/urwid/commit/24acd12f0d0598036d0d577f2ee63e4a27b4a3d9
- https://github.com/urwid/urwid/issues/1127
- https://github.com/urwid/urwid/pull/1128
- https://www.vulncheck.com/advisories/insecure-prng-and-information-exposure-in-urwid-web-display-backend
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.