ALAS2-2026-3858


Amazon Linux 2 Security Advisory: ALAS2-2026-3858
Advisory Released Date: 2026-08-17
Advisory Updated Date: 2026-08-17
Severity: Important

Issue Overview:

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 (CVE-2026-9323)


Affected Packages:

python-urwid


Note:

This advisory is applicable to Amazon Linux 2 (AL2) Core repository. Visit this FAQ section for the difference between AL2 Core and AL2 Extras advisories.


Issue Correction:
Run yum update python-urwid or yum update --advisory ALAS2-2026-3858 to update your system.

New Packages:
aarch64:
    python-urwid-1.1.1-3.amzn2.0.3.aarch64
    python-urwid-debuginfo-1.1.1-3.amzn2.0.3.aarch64

i686:
    python-urwid-1.1.1-3.amzn2.0.3.i686
    python-urwid-debuginfo-1.1.1-3.amzn2.0.3.i686

src:
    python-urwid-1.1.1-3.amzn2.0.3.src

x86_64:
    python-urwid-1.1.1-3.amzn2.0.3.x86_64
    python-urwid-debuginfo-1.1.1-3.amzn2.0.3.x86_64