# CVE-2026-103022: Urwid: handle_short_request() crashes on non-ASCII POST body (UnicodeEncodeError DoS)

- Severity: Medium 5.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.58%, higher than 48% of CVEs (2026-12-01)
- Published: 2026-11-06T21:33:37.028Z
- Modified: 2026-11-12T22:11:01.153Z
- Also known as: GHSA-cp25-j9x5-p5xm
- Weaknesses: CWE-116, CWE-248, CWE-775
- SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial
- 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.

(As written by CVE List.)

## Affected

- urwid urwid: < 4.0.7
- urwid (PyPI): before 4.0.7

## Every score

- GitHub_M: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`
- GitHub: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L`

## References

- <https://github.com/urwid/urwid/security/advisories/GHSA-cp25-j9x5-p5xm> (web)
- <https://github.com/urwid/urwid/pull/1201> (web)
- <https://github.com/urwid/urwid/commit/b79d9a96843a6f5950bb2bfab5d059bdc61c538b> (web)
- <https://github.com/urwid/urwid/releases/tag/4.0.7> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-103022> (advisory)
- <https://github.com/urwid/urwid> (package)

## Sources

- CVE List: [CVE-2026-103022](https://www.cve.org/CVERecord?id=CVE-2026-103022), CVE Terms of Use, modified 2026-11-11
- GitHub Advisory Database: [GHSA-cp25-j9x5-p5xm](https://github.com/advisories/GHSA-cp25-j9x5-p5xm), CC-BY-4.0, modified 2026-11-09
- NVD: [CVE-2026-103022](https://nvd.nist.gov/vuln/detail/CVE-2026-103022), Public domain, modified 2026-11-12

---

Page: https://cve.day/CVE-2026-103022 · Whole record: https://cve.day/CVE-2026-103022.json · Rebuilt by cve.day 2026-11-25T22:59:49.330Z
