Skip to content
OpenAdvisories
High · 8.1 CVE-2026-9323 EUVD-2026-45381GHSA-83x9-8wvq-rrcp

Insecure PRNG and Information Exposure in urwid Web Display Backend

Published Jul 18, 2026 · Updated Nov 8, 2026 · Assigned by VulnCheck

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 products

VendorProductAffectedFixed
urwid urwid — —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 urwid 4.1.3-1 —
Debian 13 urwid No fix yet —
Debian 12 urwid 2.1.2-4+deb12u1 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 urwid No fix yet —
Ubuntu 24.04 LTS urwid No fix yet —
Ubuntu 22.04 LTS urwid 2.1.2-2ubuntu0.1 USN-8751-1
Ubuntu 16.04 LTS urwid No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 26.04 LTS urwid 3.0.4-1ubuntu0.1~esm1 USN-8751-1
Ubuntu Pro 20.04 LTS urwid 2.0.1-3ubuntu0.1~esm1 USN-8751-1
Ubuntu Pro 18.04 LTS urwid 2.0.1-2ubuntu0.1~esm1 USN-8751-1
ReleasePackageFixed inAdvisory
RHEL 10 python-urwid +1 2.5.3-4.el10_2.5 RHSA-2026:58561
RHEL 9 python-urwid +1 2.1.2-4.el9_8.1 RHSA-2026:58952
RHEL 8 python-urwid +1 1.3.1-5.el8_10 RHSA-2026:58562
Show 10 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
RHEL 10.0 EUS python-urwid +1 2.5.3-4.el10_0.5 RHSA-2026:60353
RHEL 9.6 EUS python-urwid +1 2.1.2-4.el9_6.1 RHSA-2026:58955
RHEL 9.4 E4S python-urwid +1 2.1.2-4.el9_4.1 RHSA-2026:58953
RHEL 9.2 E4S python-urwid +1 2.1.2-4.el9_2.1 RHSA-2026:58954
RHEL 8.8 TUS python-urwid +1 1.3.1-4.el8_8.1 RHSA-2026:57637
RHEL 8.8 E4S python-urwid +1 1.3.1-4.el8_8.1 RHSA-2026:57637
RHEL 8.6 EUS Long Life python-urwid +1 1.3.1-4.el8_6.1 RHSA-2026:59198
RHEL 8.6 AUS python-urwid +1 1.3.1-4.el8_6.1 RHSA-2026:59198
RHEL 8.4 EUS Long Life python-urwid +1 1.3.1-4.el8_4.1 RHSA-2026:57638
RHEL 8.4 AUS python-urwid +1 1.3.1-4.el8_4.1 RHSA-2026:57638

AlmaLinux

Errata ↗
ReleasePackageFixed inAdvisory
AlmaLinux 10 python3-urwid 2.5.3-4.el10_2.5 ALSA-2026:58561
AlmaLinux 9 python3-urwid 2.1.2-4.el9_8.1 ALSA-2026:58952
AlmaLinux 8 python3-urwid 1.3.1-5.el8_10 ALSA-2026:58562

Rocky Linux

Errata ↗
ReleasePackageFixed inAdvisory
Rocky Linux 10 python-urwid 2.5.3-4.el10_2.5 RLSA-2026:58561
Rocky Linux 9 python-urwid 2.1.2-4.el9_8.1 RLSA-2026:58952
Rocky Linux 8 python-urwid 1.3.1-5.el8_10 RLSA-2026:58562
ReleasePackageFixed inAdvisory
SLES 15 SP7 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1
SLES 15 SP6 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1, SUSE-SU-2026:3425-1
SLES 15 SP5 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1, SUSE-SU-2026:3425-1
SLES 15 SP4 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1, SUSE-SU-2026:3425-1
SLES 3 python-urwid 2.1.2-150400.11.6.1 SUSE-SU-2026:3425-1
Show 5 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
SLES for SAP 15 SP6 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1, SUSE-SU-2026:3425-1
SLES for SAP 15 SP5 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1, SUSE-SU-2026:3425-1
SLES for SAP 15 SP4 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1, SUSE-SU-2026:3425-1
SLE HPC 15 SP5 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1, SUSE-SU-2026:3425-1
SLE HPC 15 SP4 python-urwid 2.0.1-150000.3.3.1 SUSE-SU-2026:3460-1, SUSE-SU-2026:3425-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed python-urwid 4.0.5-1.1 openSUSE-SU-2026:11356-1

Amazon Linux

ReleasePackageFixed inAdvisory
Amazon Linux 2023 python3-urwid 2.1.2-5.amzn2023.0.1 ALAS2023-2026-2049
Amazon Linux 2 python-urwid 1.1.1-3.amzn2.0.3 ALAS2-2026-3858

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-urwid No fix yet —

Oracle Linux

ReleasePackageFixed inAdvisory
Oracle Linux 10 python3-urwid 2.5.3-4.el10_2.5 ELSA-2026-58561
Oracle Linux 9 python3-urwid 2.1.2-4.el9_8.1 ELSA-2026-58952
Oracle Linux 8 python3-urwid 1.3.1-5.el8_10 ELSA-2026-58562

Advisories 27

References