CVE-2026-103022 PUBLISHED

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

Assigner: GitHub_M
Reserved: 29.09.2026 Published: 06.11.2026 Updated: 06.11.2026

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.

Metrics

CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CVSS Score: 5.3

Product Status

Vendor urwid
Product urwid
Versions
  • Version < 4.0.7 is affected

References

Problem Types

  • CWE-116: Improper Encoding or Escaping of Output CWE
  • CWE-248: Uncaught Exception CWE
  • CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime CWE