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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian 14 | urwid | 4.1.3-1 | — |
| Debian 13 | urwid | No fix yet | — |
| Debian 12 | urwid | No fix yet | — |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Azure Linux 3 | python-urwid | No fix yet | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| PyPI | urwid | < 4.0.7 | 4.0.7 | GHSA-cp25-j9x5-p5xm |