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

Status: published. Published: 2026-07-18. Updated: 2026-11-08.

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

## Remediation

- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: VulnCheck) — https://github.com/urwid/urwid/commit/24acd12f0d0598036d0d577f2ee63e4a27b4a3d9
- fix: The reporting source identifies this reference as a patch. Check the advisory for affected versions and supported release branches. (source: CNA: VulnCheck) — https://github.com/urwid/urwid/pull/1128

## Affected products and versions

- urwid / urwid: ≥ 0; ≤ 24acd12 (affected, git). Source: CNA: VulnCheck

## Severity and prioritization

- 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; source: CNA: VulnCheck

- 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; source: CNA: VulnCheck

- CISA KEV: No listing in collected sources

- EPSS: 0.71% as of 2026-11-08; percentile 53.99%

- SSVC: exploitation none; automatable no; technical impact total; source ADP: CISA-ADP

- Weaknesses: CWE-338

## Exploit evidence

No exploit evidence in collected sources. This is not proof of no exploitation.

## References

- https://github.com/urwid/urwid/security/advisories/GHSA-rjwp-g85x-gmjv (CNA: VulnCheck; vendor-advisory)

- https://github.com/urwid/urwid (CNA: VulnCheck; product)

- https://github.com/urwid/urwid/commit/24acd12f0d0598036d0d577f2ee63e4a27b4a3d9 (CNA: VulnCheck; patch)

- https://github.com/urwid/urwid/issues/1127 (CNA: VulnCheck; issue-tracking)

- https://github.com/urwid/urwid/pull/1128 (CNA: VulnCheck; issue-tracking, patch)

- https://www.vulncheck.com/advisories/insecure-prng-and-information-exposure-in-urwid-web-display-backend (CNA: VulnCheck; third-party-advisory)

- https://lists.debian.org/debian-lts-announce/2026/09/msg00015.html (ADP: CVE)

## Provenance

- CNA: VulnCheck: https://www.cve.org/CVERecord?id=CVE-2026-9323; retrieved 2026-11-08; source updated 2026-11-08

- FIRST EPSS: https://api.first.org/data/v1/epss?cve=CVE-2026-9323; retrieved 2026-11-08; source updated Not reported

Revision: 5a5e8efbb7c5f9e72c2caf7773b80c68e94b16e0b8fc25513cc170b43ac286b3

Canonical: https://y2.dev/cve/CVE-2026-9323

## Agent and API access

Public CVE pages, Markdown, and JSON are free to read without an account or API key.

- Public catalog: https://y2.dev/cve/index.json. Follow nextCursor with the same search, filters, sort, and limit (1–100). A null cursor marks the end.

- WebMCP: search_cve_disclosures, get_cve_disclosure, get_cve_page_markdown, get_y2_cve_access. Available in compatible browsers.

- Cyber API: https://api.y2.dev/api/v2/cyber/cves and https://api.y2.dev/api/v2/cyber/cves/{cveId}.

- Y2 Pro or Elite: create a workspace API key with the intel:cyber scope and send Authorization: Bearer <Y2_API_KEY>. Setup: https://y2.dev/docs/api/create-key.

- x402: Pay per request without an account or API key. Omit Authorization, read the HTTP 402 PAYMENT-REQUIRED challenge, validate its current requirements, and retry with PAYMENT-SIGNATURE through an authorized payment client. These browser tools never make payments. Guide: https://y2.dev/docs/api/x402.

- OpenAPI: https://y2.dev/api/openapi.yaml. Agent access metadata: https://y2.dev/cve/agent.json.

Collected public records only. Check source status for coverage and freshness.