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

Published Jul 18, 2026
·
Updated

Last updated 14 September 2026

Other sources

The urwid web display backend (urwid/display/web.py) generates web session identifiers (urwidid) in Screen.start() by concatenating two random.randrange(109) 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

— MITRE

Affected Software

3 affected componentsFixes available
urwid web display backend
debian/urwid<=2.1.2-4, <=2.6.16-1, <=3.0.4-1
2.1.2-4+deb12u14.1.3-1
IBM Cloud Pak for Data System (Yosemite 1.0)<=11.3.1.2-IF1 - 11.3.1.2-IF2

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/urwid to a version that resolves this vulnerability.

    Fixed in 2.1.2-4+deb12u1Fixed in 4.1.3-1

Event History

Jul 18, 2026
CVE Published
via MITRE·01:51 PM
Data Sourced
via MITRE·01:51 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·02:17 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·03:01 PM
DescriptionSeverityAffected Software
Oct 21, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Frequently Asked Questions

1

What is the severity of CVE-2026-9323?

The severity of CVE-2026-9323 is high with a score of 8.1.

2

What are the risks associated with CVE-2026-9323?

CVE-2026-9323 involves the use of an insecure pseudo-random number generator, leading to potential information exposure and vulnerabilities.

3

How do I fix CVE-2026-9323?

To fix CVE-2026-9323, replace the insecure PRNG with a cryptographically secure random number generator.

4

What software is affected by CVE-2026-9323?

CVE-2026-9323 affects the urwid web display backend.

5

What is the main vulnerability in CVE-2026-9323?

The main vulnerability in CVE-2026-9323 is the use of a weak random number generator for session identifier generation.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203