Skip to content
OpenAdvisories
Medium · 5.3 CVE-2026-103022 EUVD-2026-118521GHSA-cp25-j9x5-p5xm

Urwid: handle_short_request() crashes on non-ASCII POST body (UnicodeEncodeError DoS)

Published Nov 6, 2026 · Updated Nov 11, 2026 · Assigned by GitHub_M

Description

Urwid is a console user interface library for Python. Prior to 4.0.7, handle_short_request() in urwid/display/web.py performs unguarded character encoding on POST input and unguarded UTF-8 decoding on polling update socket output. A remote attacker who obtains a valid X-Urwid-ID session token can submit non-ASCII POST data that raises UnicodeEncodeError, while non-UTF-8 polling output raises UnicodeDecodeError, causing the CGI handler to return an error and terminate request processing. The POST exception path also leaves an opened file descriptor unclosed for the CGI process lifetime, so repeated requests can cause denial of service for the web display interface. This issue is fixed in version 4.0.7.

Affected products

VendorProductAffectedFixed
urwid urwid < 4.0.7 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 urwid 4.1.3-1 —
Debian 13 urwid No fix yet —
Debian 12 urwid No fix yet —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 urwid No fix yet —
Ubuntu 24.04 LTS urwid No fix yet —
Ubuntu 22.04 LTS urwid No fix yet —
Ubuntu 16.04 LTS urwid No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 26.04 LTS urwid No fix yet —
Ubuntu Pro 20.04 LTS urwid No fix yet —
Ubuntu Pro 18.04 LTS urwid No fix yet —

Azure Linux

ReleasePackageFixed inAdvisory
Azure Linux 3 python-urwid No fix yet —

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI urwid < 4.0.7 4.0.7 GHSA-cp25-j9x5-p5xm

References