NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · PyPI

GHSA-83x9-8wvq-rrcp: Duplicate Advisory: urwid: Insecure PRNG and Information Exposure in Web Display Backend

criticalCVSS 4.0 9.2 · 3.1 8.1

This advisory was withdrawn on Nov 5, 2026. The publisher no longer considers it a valid vulnerability.

Duplicate Advisory This advisory has been withdrawn because it is a duplicate of GHSA-rjwp-g85x-gmjv. This link is maintained to preserve external references. Original Description 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…

Published Jul 18, 2026 · Updated Nov 5, 2026

Affected packages

urwid

Ecosystem
PyPI
Affected
< 4.0.6
Fixed in
4.0.6
Check
pip show urwid

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Duplicate Advisory

This advisory has been withdrawn because it is a duplicate of GHSA-rjwp-g85x-gmjv. This link is maintained to preserve external references.

Original 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

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More PyPI vulnerabilities

All PyPI entries