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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | urwid | 4.1.3-1 | — |
| Debian 13 | urwid | No fix yet | — |
| Debian 12 | urwid | 2.1.2-4+deb12u1 | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Red Hat
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
SUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| openSUSE Tumbleweed | python-urwid | 4.0.5-1.1 | openSUSE-SU-2026:11356-1 |
Amazon Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | python-urwid | No fix yet | — |
Oracle Linux
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
- WID-SEC-2026-2961 Red Hat Enterprise Linux (mrtg, kbd, urwid): Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 3, 2026
- WID-SEC-2026-3595 IBM QRadar SIEM: Mehrere Schwachstellen BSI CERT-Bund (WID) · Nov 2, 2026
- ALSA-2026:58952 Important: python-urwid security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2026:58561 Important: python-urwid security update AlmaLinux Security Advisories · Oct 29, 2026
- ALSA-2026:58562 Important: python-urwid security update AlmaLinux Security Advisories · Oct 29, 2026
- USN-8751-1 urwid vulnerabilities Ubuntu Security Notices (USN) · Sep 14, 2026
- RHSA-2026:60353 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:59198 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:58954 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:58955 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:58952 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:58953 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:58561 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:58562 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:57638 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RHSA-2026:57637 Red Hat Security Advisory: python-urwid security update Red Hat Security Advisories (RHSA) · Aug 27, 2026
- RLSA-2026:58952 Important: python-urwid security update Rocky Linux Security Advisories · Aug 26, 2026
- RLSA-2026:58561 Important: python-urwid security update Rocky Linux Security Advisories · Aug 24, 2026
- RLSA-2026:58562 Important: python-urwid security update Rocky Linux Security Advisories · Aug 24, 2026
- ELSA-2026-58561 Important: python-urwid security update (Oracle Linux 10) Oracle Linux Security Advisories (ELSA) · Aug 24, 2026
- ELSA-2026-58952 Important: python-urwid security update (Oracle Linux 9) Oracle Linux Security Advisories (ELSA) · Aug 24, 2026
- ELSA-2026-58562 Important: python-urwid security update (Oracle Linux 8) Oracle Linux Security Advisories (ELSA) · Aug 24, 2026
- ALAS2-2026-3858 Important: python-urwid security update (Amazon Linux 2) Amazon Linux Security Center (ALAS) · Aug 17, 2026
- ALAS2023-2026-2049 Important: python-urwid security update (Amazon Linux 2023) Amazon Linux Security Center (ALAS) · Aug 17, 2026
- SUSE-SU-2026:3460-1 Security update for python-urwid SUSE / openSUSE Security Updates · Aug 4, 2026
- SUSE-SU-2026:3425-1 Security update for python-urwid SUSE / openSUSE Security Updates · Jul 31, 2026
- openSUSE-SU-2026:11356-1 python313-urwid-4.0.5-1.1 on GA media SUSE / openSUSE Security Updates · Jul 24, 2026
References
- GitHub Security Advisory (GHSA-rjwp-g85x-gmjv) vendor-advisory
- Product product
- Patch Commit patch
- GitHub Issue issue-tracking
- Pull Request issue-tracking patch
- https://www.vulncheck.com/advisories/insecure-prng-and-information-exposure-in-urwid-web-display-backend third-party-advisory