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

> Insecure PRNG allows session ID prediction, enabling attackers to hijack sessions, execute code, or crash the application.

- **Severity:** Critical 9.2 (`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`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 18 Jul 2026
- **Updated:** 15 Sep 2026
- **Also known as:** ALSA-2026:58561, ALSA-2026:58562, ALSA-2026:58952, AZL-92916, BELL-CVE-2026-9323, DEBIAN-CVE-2026-9323, GHSA-83x9-8wvq-rrcp, GHSA-rjwp-g85x-gmjv, MGASA-2026-0466, OESA-2026-3193, RHSA-2026:57637, RHSA-2026:57638, RHSA-2026:58561, RHSA-2026:58562, RHSA-2026:58952, RHSA-2026:58953, RHSA-2026:58954, RHSA-2026:58955, RHSA-2026:59198, RHSA-2026:60353, RLSA-2026:58561, RLSA-2026:58562, RLSA-2026:58952, SUSE-SU-2026:3425-1, SUSE-SU-2026:3460-1, UBUNTU-CVE-2026-9323, USN-8751-1, openSUSE-SU-2026:11356-1

## What is CVE-2026-9323?

CVE-2026-9323 is a critical vulnerability in urwid, published on 18 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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

Weakness: CWE-338 (Use of Cryptographically Weak Pseudo-Random Number Generator (PRNG))

## Which versions are affected by CVE-2026-9323?


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `python3-urwid` | AlmaLinux:10 | All versions | 2.5.3-4.el10_2.5 |
| `python3-urwid` | AlmaLinux:8 | All versions | 1.3.1-5.el8_10 |
| `python3-urwid` | AlmaLinux:9 | All versions | 2.1.2-4.el9_8.1 |
| `python-urwid` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.5.3-4.el10_2.5 |
| `python-urwid-debugsource` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.5.3-4.el10_2.5 |
| `python3-urwid` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.5.3-4.el10_2.5 |
| `python3-urwid-debuginfo` | Red Hat:enterprise_linux:10.2 | All versions | 0:2.5.3-4.el10_2.5 |
| `python-urwid` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1.3.1-5.el8_10 |
| `python-urwid-debugsource` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1.3.1-5.el8_10 |
| `python3-urwid` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1.3.1-5.el8_10 |
| `python3-urwid-debuginfo` | Red Hat:enterprise_linux:8::baseos | All versions | 0:1.3.1-5.el8_10 |
| `python-urwid` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.1.2-4.el9_8.1 |
| `python-urwid-debugsource` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.1.2-4.el9_8.1 |
| `python3-urwid` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.1.2-4.el9_8.1 |
| `python3-urwid-debuginfo` | Red Hat:enterprise_linux:9::baseos | All versions | 0:2.1.2-4.el9_8.1 |
| `python-urwid` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.5.3-4.el10_0.5 |
| `python-urwid-debugsource` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.5.3-4.el10_0.5 |
| `python3-urwid` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.5.3-4.el10_0.5 |
| `python3-urwid-debuginfo` | Red Hat:enterprise_linux_eus:10.0 | All versions | 0:2.5.3-4.el10_0.5 |
| `python-urwid` | Red Hat:rhel_aus:8.4::baseos | All versions | 0:1.3.1-4.el8_4.1 |
| `python-urwid-debugsource` | Red Hat:rhel_aus:8.4::baseos | All versions | 0:1.3.1-4.el8_4.1 |
| `python3-urwid` | Red Hat:rhel_aus:8.4::baseos | All versions | 0:1.3.1-4.el8_4.1 |
| `python3-urwid-debuginfo` | Red Hat:rhel_aus:8.4::baseos | All versions | 0:1.3.1-4.el8_4.1 |
| `python-urwid` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:1.3.1-4.el8_6.1 |
| `python-urwid-debugsource` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:1.3.1-4.el8_6.1 |
| `python3-urwid` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:1.3.1-4.el8_6.1 |
| `python3-urwid-debuginfo` | Red Hat:rhel_aus:8.6::baseos | All versions | 0:1.3.1-4.el8_6.1 |
| `python-urwid` | Red Hat:rhel_e4s:8.8::baseos | All versions | 0:1.3.1-4.el8_8.1 |
| `python-urwid-debugsource` | Red Hat:rhel_e4s:8.8::baseos | All versions | 0:1.3.1-4.el8_8.1 |
| `python3-urwid` | Red Hat:rhel_e4s:8.8::baseos | All versions | 0:1.3.1-4.el8_8.1 |
| `python3-urwid-debuginfo` | Red Hat:rhel_e4s:8.8::baseos | All versions | 0:1.3.1-4.el8_8.1 |
| `python-urwid` | Red Hat:rhel_e4s:9.2::baseos | All versions | 0:2.1.2-4.el9_2.1 |
| `python-urwid-debugsource` | Red Hat:rhel_e4s:9.2::baseos | All versions | 0:2.1.2-4.el9_2.1 |
| `python3-urwid` | Red Hat:rhel_e4s:9.2::baseos | All versions | 0:2.1.2-4.el9_2.1 |
| `python3-urwid-debuginfo` | Red Hat:rhel_e4s:9.2::baseos | All versions | 0:2.1.2-4.el9_2.1 |
| `python-urwid` | Red Hat:rhel_e4s:9.4::baseos | All versions | 0:2.1.2-4.el9_4.1 |
| `python-urwid-debugsource` | Red Hat:rhel_e4s:9.4::baseos | All versions | 0:2.1.2-4.el9_4.1 |
| `python3-urwid` | Red Hat:rhel_e4s:9.4::baseos | All versions | 0:2.1.2-4.el9_4.1 |
| `python3-urwid-debuginfo` | Red Hat:rhel_e4s:9.4::baseos | All versions | 0:2.1.2-4.el9_4.1 |
| `python-urwid` | Red Hat:rhel_eus:9.6::baseos | All versions | 0:2.1.2-4.el9_6.1 |

## How do I fix CVE-2026-9323?

Apply the vendor's patch.

## Is CVE-2026-9323 being exploited?

There is no known exploitation of CVE-2026-9323 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-9323 and fix it if it is affected.

What it is: CVE-2026-9323 is a critical vulnerability in urwid, published on 18 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-9323 in the wild and no public exploit code.

Affected product: urwid. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-9323/ (Markdown: https://insights.sbomify.com/CVE-2026-9323/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-9323
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-9323
- OSV: https://osv.dev/vulnerability/CVE-2026-9323

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-9323/
Summaries are generated and may contain mistakes; the official description above is the record.
