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.
Severity (CVSS)
| Base score | 5.3 |
|---|---|
| Severity | Medium |
| Version | CVSS 3.1 |
| Vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L |
| Provided by | CNA |
Weaknesses
- CWE-116 — CWE-116: Improper Encoding or Escaping of Output
- CWE-248 — CWE-248: Uncaught Exception
- CWE-775 — CWE-775: Missing Release of File Descriptor or Handle after Effective Lifetime
Affected products
| Vendor | Product | Versions |
|---|---|---|
| urwid | urwid | < 4.0.7 [affected] |
References
- https://github.com/urwid/urwid/security/advisories/GHSA-cp25-j9x5-p5xm (x_refsource_CONFIRM)
- https://github.com/urwid/urwid/pull/1201 (x_refsource_MISC)
- https://github.com/urwid/urwid/commit/b79d9a96843a6f5950bb2bfab5d059bdc61c538b (x_refsource_MISC)
- https://github.com/urwid/urwid/releases/tag/4.0.7 (x_refsource_MISC)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 07 Nov 2026 08:06 UTC.