Advisory

UBUNTU-CVE-2026-9323

Also known as: CVE-2026-9323

Summary

The record has no summary.

Details

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

Severity

High Basis: CVSS v3 score 8.1, vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

Dates

Published
2026-07-18 14:17 UTC
Modified
2026-11-18 00:57 UTC

Affected packages and fixes

urwid

Debian packages (deb) · Ubuntu 22.04

Affected

  • introduced 0, fixed 2.1.2-2ubuntu0.1 (ecosystem)

Fixed versions

2.1.2-2ubuntu0.1

Fix

  • Fixed version 2.1.2-2ubuntu0.1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

urwid

Debian packages (deb) · Ubuntu 24.04

Affected

  • introduced 0, fixed 2.6.10-1ubuntu0.1 (ecosystem)

Fixed versions

2.6.10-1ubuntu0.1

Fix

  • Fixed version 2.6.10-1ubuntu0.1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

urwid

Debian packages (deb) · Ubuntu 26.10

Affected

  • introduced 0, fixed 3.0.4-1ubuntu0.26.10.1 (ecosystem)

Fixed versions

3.0.4-1ubuntu0.26.10.1

Fix

  • Fixed version 3.0.4-1ubuntu0.26.10.1
    sudo apt-get update && sudo apt-get upgrade

This command upgrades the distribution's packages. Compare the fixed version with the version you have installed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Ubuntu Security Notices · CC BY-SA 4.0

Sources & licences