cve.bz

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

9.2 criticalEPSS 0.7%

Critical (9.2) in urwid urwid. EPSS 0.7% estimated probability of exploitation activity in the next 30 days.

On this page
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

Severity

CVSS 4.0

9.2 critical
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

CVSS 3.1

8.1 high
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
0.7% (unchanged from 0.7% a week ago; 0.7% 30 days ago) estimated probability of exploitation activity in the next 30 days; 50th percentile. Scored 2026-11-26. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-07-20. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-338 Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG)
OWASP Top 10
A04:2025 Cryptographic Failures
Published
Modified
Assigned by
VulnCheck (CNA)
NVD analysis
Deferred: the NVD does not plan to analyze it
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-9323 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-9323?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-9323?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-9323 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
urwidbefore 5.1.0

Linux distributions

DistributionReleasePackageFixed inAdvisory
Debian12urwid2.1.2-4+deb12u1DEBIAN-CVE-2026-9323 DLA-4780-1
Debian13urwidno fix listedDEBIAN-CVE-2026-9323
Debian14urwid4.1.3-1DEBIAN-CVE-2026-9323
Ubuntu22.04:LTSurwid2.1.2-2ubuntu0.1UBUNTU-CVE-2026-9323 USN-8751-1
Ubuntu24.04:LTSurwid2.6.10-1ubuntu0.1UBUNTU-CVE-2026-9323 USN-8751-2
Ubuntu26.10urwid3.0.4-1ubuntu0.26.10.1UBUNTU-CVE-2026-9323 USN-8751-2
UbuntuPro:16.04:LTSurwid1.3.1-2ubuntu0.1~esm2UBUNTU-CVE-2026-9323 USN-8751-2
UbuntuPro:18.04:LTSurwid2.0.1-2ubuntu0.1~esm1UBUNTU-CVE-2026-9323 USN-8751-1
UbuntuPro:20.04:LTSurwid2.0.1-3ubuntu0.1~esm1UBUNTU-CVE-2026-9323 USN-8751-1
UbuntuPro:26.04:LTSurwid3.0.4-1ubuntu0.1~esm1UBUNTU-CVE-2026-9323 USN-8751-1
Red Hatenterprise_linux:8::baseospython-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:1.3.1-5.el8_10RHSA-2026:58562
Red Hatenterprise_linux:9::baseospython-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:2.1.2-4.el9_8.1RHSA-2026:58952
Red Hatenterprise_linux:10.2python-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:2.5.3-4.el10_2.5RHSA-2026:58561
Red Hatenterprise_linux_eus:10.0python-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:2.5.3-4.el10_0.5RHSA-2026:60353
Red Hatrhel_aus:8.4::baseos, rhel_eus_long_life:8.4::baseospython-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:1.3.1-4.el8_4.1RHSA-2026:57638
Red Hatrhel_aus:8.6::baseos, rhel_eus_long_life:8.6::baseospython-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:1.3.1-4.el8_6.1RHSA-2026:59198
Red Hatrhel_e4s:8.8::baseos, rhel_tus:8.8::baseospython-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:1.3.1-4.el8_8.1RHSA-2026:57637
Red Hatrhel_e4s:9.2::baseospython-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:2.1.2-4.el9_2.1RHSA-2026:58954
Red Hatrhel_e4s:9.4::baseospython-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:2.1.2-4.el9_4.1RHSA-2026:58953
Red Hatrhel_eus:9.6::baseospython-urwid, python3-urwid, python3-urwid-debuginfo and 1 more0:2.1.2-4.el9_6.1RHSA-2026:58955
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 8 morepython-urwid2.0.1-150000.3.3.1SUSE-SU-2026:3460-1
SUSELinux Enterprise High Performance Computing 15 SP4-ESPOS, Linux Enterprise High Performance Computing 15 SP4-LTSS, Linux Enterprise High Performance Computing 15 SP5-ESPOS and 8 morepython-urwid2.1.2-150400.11.6.1SUSE-SU-2026:3425-1
openSUSETumbleweedpython-urwid4.0.5-1.1openSUSE-SU-2026:11356-1
AlmaLinux8python3-urwid1.3.1-5.el8_10ALSA-2026:58562
AlmaLinux9python3-urwid2.1.2-4.el9_8.1ALSA-2026:58952
AlmaLinux10python3-urwid2.5.3-4.el10_2.5ALSA-2026:58561
Rocky Linux8python-urwid0:1.3.1-5.el8_10RLSA-2026:58562
Rocky Linux9python-urwid0:2.1.2-4.el9_8.1RLSA-2026:58952
Rocky Linux10python-urwid0:2.5.3-4.el10_2.5RLSA-2026:58561
Azure Linux3python-urwidno fix listedAZL-92916
Alpaquita23py3-urwid2.2.3-r1BELL-CVE-2026-9323
Alpaquita25py3-urwid2.6.13-r1BELL-CVE-2026-9323
Alpaquitastreampy3-urwid3.0.5-r1BELL-CVE-2026-9323

From the distributions' data via OSV.dev: the Debian Security Tracker; Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; Microsoft's Azure Linux vulnerability data, MIT; BellSoft's OSV database, MIT. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Debian · Ubuntu · Red Hat · SUSE · openSUSE · Alpaquita.

Red Hat

Red Hat rates this Important.

Red Hat's statement

The flaw is Important because predictable session identifiers in the urwid web display backend allow for remote code execution and information disclosure. Attackers can reconstruct the PRNG state by observing session IDs or enumerate active tokens from temporary files, leading to OS-level code execution with victim privileges.

Red Hat's mitigation

To mitigate this vulnerability, it is recommended to disable the urwid web display backend if its functionality is not essential for your environment. If the urwid web display backend must remain active, restrict network access to the service to trusted clients only by implementing appropriate firewall rules. This will limit the exposure to remote attackers attempting to reconstruct session IDs. Additionally, ensure that local system configurations prevent unauthorized access to temporary files, which could otherwise allow local users to enumerate active session tokens. Any changes to service configurations may require a service restart to take effect.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10python-urwid-0:2.5.3-4.el10_2.5Fixed 2026-08-24RHSA-2026:58561
Red Hat Enterprise Linux 10.0 Extended Update Supportpython-urwid-0:2.5.3-4.el10_0.5Fixed 2026-08-26RHSA-2026:60353
Red Hat Enterprise Linux 8python-urwid-0:1.3.1-5.el8_10Fixed 2026-08-24RHSA-2026:58562
Red Hat Enterprise Linux 8.4 Advanced Mission Critical Update Supportpython-urwid-0:1.3.1-4.el8_4.1Fixed 2026-08-20RHSA-2026:57638
Red Hat Enterprise Linux 8.4 Extended Update Support Long-Life Add-Onpython-urwid-0:1.3.1-4.el8_4.1Fixed 2026-08-20RHSA-2026:57638
Red Hat Enterprise Linux 8.6 Advanced Mission Critical Update Supportpython-urwid-0:1.3.1-4.el8_6.1Fixed 2026-08-24RHSA-2026:59198
Red Hat Enterprise Linux 8.6 Extended Update Support Long-Life Add-Onpython-urwid-0:1.3.1-4.el8_6.1Fixed 2026-08-24RHSA-2026:59198
Red Hat Enterprise Linux 8.8 Telecommunications Update Servicepython-urwid-0:1.3.1-4.el8_8.1Fixed 2026-08-20RHSA-2026:57637
Red Hat Enterprise Linux 8.8 Update Services for SAP Solutionspython-urwid-0:1.3.1-4.el8_8.1Fixed 2026-08-20RHSA-2026:57637
Red Hat Enterprise Linux 9python-urwid-0:2.1.2-4.el9_8.1Fixed 2026-08-24RHSA-2026:58952
Red Hat Enterprise Linux 9.2 Update Services for SAP Solutionspython-urwid-0:2.1.2-4.el9_2.1Fixed 2026-08-24RHSA-2026:58954
Red Hat Enterprise Linux 9.4 Update Services for SAP Solutionspython-urwid-0:2.1.2-4.el9_4.1Fixed 2026-08-24RHSA-2026:58953
Red Hat Enterprise Linux 9.6 Extended Update Supportpython-urwid-0:2.1.2-4.el9_6.1Fixed 2026-08-24RHSA-2026:58955
Red Hat Enterprise Linux 6python-urwidOut of support scope
Red Hat Enterprise Linux 7python-urwidOut of support scope

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2026-9323.

References

Check your stackJSON