Skip to content

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

CriticalCVSS 9.2 EPSS 0.72%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: total
Technology
UbuntuDebianRed Hat

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

Upgrade path

21 packages: 20 fixed, 1 with no fix yet.

PackageAffectedFixed inStatus
debian/urwid(Debian 13) = 2.6.16-1; = 3.0.4-1; = 4.1.3-1; = 4.2.1-1 +1 more No fix listed No fix yet
debian/urwid(Debian 12) < 2.1.2-4+deb12u1; = 2.1.2-4 2.1.2-4+deb12u1 Fixed
debian/urwid(Debian 14) < 4.1.3-1; = 2.6.16-1; = 3.0.4-1 4.1.3-1 Fixed
redhat/python-urwid(Red Hat enterprise_linux 10.2) < 2.5.3-4.el10_2.5 2.5.3-4.el10_2.5 Fixed
redhat/python-urwid(Red Hat enterprise_linux 8) < 1.3.1-5.el8_10 1.3.1-5.el8_10 Fixed
redhat/python-urwid(Red Hat enterprise_linux 9) < 2.1.2-4.el9_8.1 2.1.2-4.el9_8.1 Fixed
redhat/python-urwid(Red Hat enterprise_linux_eus 10.0) < 2.5.3-4.el10_0.5 2.5.3-4.el10_0.5 Fixed
redhat/python-urwid(Red Hat rhel_aus 8.4) < 1.3.1-4.el8_4.1 1.3.1-4.el8_4.1 Fixed
redhat/python-urwid(Red Hat rhel_aus 8.6) < 1.3.1-4.el8_6.1 1.3.1-4.el8_6.1 Fixed
redhat/python-urwid(Red Hat rhel_e4s 8.8) < 1.3.1-4.el8_8.1 1.3.1-4.el8_8.1 Fixed
redhat/python-urwid(Red Hat rhel_e4s 9.2) < 2.1.2-4.el9_2.1 2.1.2-4.el9_2.1 Fixed
redhat/python-urwid(Red Hat rhel_e4s 9.4) < 2.1.2-4.el9_4.1 2.1.2-4.el9_4.1 Fixed
redhat/python-urwid(Red Hat rhel_eus 9.6) < 2.1.2-4.el9_6.1 2.1.2-4.el9_6.1 Fixed
redhat/python-urwid(Red Hat rhel_eus_long_life 8.4) < 1.3.1-4.el8_4.1 1.3.1-4.el8_4.1 Fixed
redhat/python-urwid(Red Hat rhel_eus_long_life 8.6) < 1.3.1-4.el8_6.1 1.3.1-4.el8_6.1 Fixed
redhat/python-urwid(Red Hat rhel_tus 8.8) < 1.3.1-4.el8_8.1 1.3.1-4.el8_8.1 Fixed
ubuntu/urwid(Ubuntu 22.04) < 2.1.2-2ubuntu0.1 2.1.2-2ubuntu0.1 Fixed
ubuntu/urwid(Ubuntu 24.04) < 2.6.10-1ubuntu0.1 2.6.10-1ubuntu0.1 Fixed
ubuntu/urwid(Ubuntu 26.04) < 3.0.4-1ubuntu0.1~esm1 3.0.4-1ubuntu0.1~esm1 Fixed
ubuntu/urwid(Ubuntu 26.10) < 3.0.4-1ubuntu0.26.10.1 3.0.4-1ubuntu0.26.10.1 Fixed
urwid < 5.1.0 5.1.0 Fixed

Affected products

ProductAffected versionsFixed in
redhat/python-urwid(Red Hat:enterprise_linux:10.2) < 2.5.3-4.el10_2.5 2.5.3-4.el10_2.5
redhat/python-urwid(Red Hat:enterprise_linux_eus:10.0) < 2.5.3-4.el10_0.5 2.5.3-4.el10_0.5
redhat/python-urwid(Red Hat:enterprise_linux:8) < 1.3.1-5.el8_10 1.3.1-5.el8_10
redhat/python-urwid(Red Hat:rhel_aus:8.4) < 1.3.1-4.el8_4.1 1.3.1-4.el8_4.1
redhat/python-urwid(Red Hat:rhel_eus_long_life:8.4) < 1.3.1-4.el8_4.1 1.3.1-4.el8_4.1
redhat/python-urwid(Red Hat:rhel_aus:8.6) < 1.3.1-4.el8_6.1 1.3.1-4.el8_6.1
redhat/python-urwid(Red Hat:rhel_eus_long_life:8.6) < 1.3.1-4.el8_6.1 1.3.1-4.el8_6.1
redhat/python-urwid(Red Hat:rhel_tus:8.8) < 1.3.1-4.el8_8.1 1.3.1-4.el8_8.1
redhat/python-urwid(Red Hat:rhel_e4s:8.8) < 1.3.1-4.el8_8.1 1.3.1-4.el8_8.1
redhat/python-urwid(Red Hat:enterprise_linux:9) < 2.1.2-4.el9_8.1 2.1.2-4.el9_8.1
redhat/python-urwid(Red Hat:rhel_e4s:9.2) < 2.1.2-4.el9_2.1 2.1.2-4.el9_2.1
redhat/python-urwid(Red Hat:rhel_e4s:9.4) < 2.1.2-4.el9_4.1 2.1.2-4.el9_4.1
redhat/python-urwid(Red Hat:rhel_eus:9.6) < 2.1.2-4.el9_6.1 2.1.2-4.el9_6.1
redhat/python-urwid(Red Hat:rhel_els:6) All versions No fix listed
redhat/python-urwid(Red Hat:rhel_els:7) All versions No fix listed
debian/urwid(Debian:12) < 2.1.2-4+deb12u1 2.1.2-4+deb12u1
debian/urwid(Debian:12) = 2.1.2-4 No fix listed
debian/urwid(Debian:13) All versions No fix listed
debian/urwid(Debian:13) = 2.6.16-1 No fix listed
debian/urwid(Debian:13) = 3.0.4-1 No fix listed
debian/urwid(Debian:13) = 4.1.3-1 No fix listed
debian/urwid(Debian:13) = 4.2.1-1 No fix listed
debian/urwid(Debian:14) < 4.1.3-1 4.1.3-1
debian/urwid(Debian:14) = 2.6.16-1 No fix listed
debian/urwid(Debian:14) = 3.0.4-1 No fix listed
Show 5 more
ProductAffected versionsFixed in
ubuntu/urwid(Ubuntu:22.04) < 2.1.2-2ubuntu0.1 2.1.2-2ubuntu0.1
ubuntu/urwid(Ubuntu:24.04) < 2.6.10-1ubuntu0.1 2.6.10-1ubuntu0.1
ubuntu/urwid(Ubuntu:26.04) < 3.0.4-1ubuntu0.1~esm1 3.0.4-1ubuntu0.1~esm1
ubuntu/urwid(Ubuntu:26.10) < 3.0.4-1ubuntu0.26.10.1 3.0.4-1ubuntu0.26.10.1
urwid < 5.1.0 5.1.0

References