Urwid: handle_short_request() crashes on non-ASCII POST body (UnicodeEncodeError DoS)
Affected packages
| Package | Affected → Fixed | |
|---|---|---|
| urwidurwid | — | Not listed |
| pipurwid |
< 4.0.7→ 4.0.7 |
4.0.7 |
| PyPIurwid |
< 4.0.7→ 4.0.7 |
4.0.7 |
Fix status by distribution
Records published by each distribution for this CVE. Fixed versions differ by release; check each link.
- BellSoft Alpaquita BELL-CVE-2026-103022 py3-urwid Fix available
- Debian DEBIAN-CVE-2026-103022 urwid Fix available
- Ubuntu UBUNTU-CVE-2026-103022 urwid No fixed version in this record
Original description The description as published by the source.
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.
Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory
References
- advisory github.com
- advisory github.com
- advisory nvd.nist.gov
- package github.com
- patch github.com
- patch github.com
- web github.com
- web github.com