Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

redhat логотип

CVE-2026-9323

Опубликовано: 18 июл. 2026
Источник: redhat
CVSS3: 8.1
EPSS Низкий

Описание

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

A flaw was found in the urwid web display backend. This vulnerability arises from the use of a cryptographically insecure pseudo-random number generator (PRNG) for web session identifiers, making them predictable. An attacker could either observe enough session IDs to reconstruct the PRNG state or, if local, enumerate active session tokens from temporary files. Successful exploitation allows an attacker to read a victim's terminal screen, inject keystrokes leading to operating system-level code execution, or cause a denial of service by terminating the session.

Отчет

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.

Меры по смягчению последствий

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.

Затронутые пакеты

ПлатформаПакетСостояниеРекомендацияРелиз
Red Hat Enterprise Linux 10python-urwidAffected
Red Hat Enterprise Linux 6python-urwidOut of support scope
Red Hat Enterprise Linux 7python-urwidOut of support scope
Red Hat Enterprise Linux 8python-urwidAffected
Red Hat Enterprise Linux 9python-urwidAffected

Показывать по

Дополнительная информация

Статус:

Important
Дефект:
CWE-1241
https://bugzilla.redhat.com/show_bug.cgi?id=2502072urwid: Urwid: Predictable session IDs lead to remote code execution and information disclosure

EPSS

Процентиль: 35%
0.00421
Низкий

8.1 High

CVSS3

Связанные уязвимости

CVSS3: 8.1
ubuntu
13 дней назад

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...

CVSS3: 8.1
nvd
13 дней назад

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 ex

CVSS3: 8.1
debian
13 дней назад

The urwid web display backend (urwid/display/web.py) generates web ses ...

CVSS3: 8.1
github
13 дней назад

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...

EPSS

Процентиль: 35%
0.00421
Низкий

8.1 High

CVSS3