CVEfocus › CVE database › CVE-2026-9323

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

CVSS 8.1 HighEPSS 0.7% (higher than 50% of CVEs)Published 2026-07-18Updated 2026-11-20Assigner: VulnCheck

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

CWE-338

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

17Fixed
5Fix pending
2Will not fix

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.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.10urwidFixed3.0.4-1ubuntu0.26.10.1UBUNTU-CVE-2026-9323
Ubuntu 26.04urwidFix pending3.0.4-1ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2026-9323
Ubuntu 24.04urwidFixed2.6.10-1ubuntu0.1UBUNTU-CVE-2026-9323
Ubuntu 22.04urwidFixed2.1.2-2ubuntu0.1UBUNTU-CVE-2026-9323
Ubuntu 20.04urwidFix pending2.0.1-3ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2026-9323
Ubuntu 18.04urwidFix pending2.0.1-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2026-9323
Ubuntu 16.04urwidFix pending1.3.1-2ubuntu0.1~esm2 (Ubuntu Pro)UBUNTU-CVE-2026-9323
Debian 14urwidFixed4.1.3-1DEBIAN-CVE-2026-9323
Debian 13urwidFix pendingDEBIAN-CVE-2026-9323
Debian 12urwidFixed2.1.2-4+deb12u1DEBIAN-CVE-2026-9323
Red Hat Enterprise Linux 10python-urwidFixed0:2.5.3-4.el10_2.5RHSA-2026:58561
Red Hat Enterprise Linux 10python3-urwidFixed0:2.5.3-4.el10_2.5RHSA-2026:58561
Red Hat Enterprise Linux 9python-urwidFixed0:2.1.2-4.el9_8.1RHSA-2026:58952
Red Hat Enterprise Linux 9python3-urwidFixed0:2.1.2-4.el9_8.1RHSA-2026:58952
Red Hat Enterprise Linux 8python-urwidFixed0:1.3.1-5.el8_10RHSA-2026:58562
Red Hat Enterprise Linux 8python3-urwidFixed0:1.3.1-5.el8_10RHSA-2026:58562
Red Hat Enterprise Linux 7python-urwidWill not fix
Out of support scope
Red Hat Enterprise Linux 6python-urwidWill not fix
Out of support scope
AlmaLinux 10python3-urwidFixed2.5.3-4.el10_2.5ALSA-2026:58561
AlmaLinux 9python3-urwidFixed2.1.2-4.el9_8.1ALSA-2026:58952
AlmaLinux 8python3-urwidFixed1.3.1-5.el8_10ALSA-2026:58562
Rocky Linux 10python-urwidFixed0:2.5.3-4.el10_2.5RLSA-2026:58561
Rocky Linux 9python-urwidFixed0:2.1.2-4.el9_8.1RLSA-2026:58952
Rocky Linux 8python-urwidFixed0:1.3.1-5.el8_10RLSA-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.

Vendor advisories:

References

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.