CVE-2026-103022: Urwid: handle_short_request() crashes on non-ASCII POST body (UnicodeEncodeError DoS)
Published 2026-11-09 · Updated 2026-11-09 · Also known as GHSA-cp25-j9x5-p5xm
Summary
The Urwid library contains an unhandled exception vulnerability in its web display module that can lead to Denial of Service (DoS) via malformed POST requests. Organizations using the Urwid web display interface should upgrade to version 4.0.7 or later to address the issue.
Who is affected
Affected deployments are those utilizing the Urwid CGI web interface, which is vulnerable to unhandled UnicodeEncodeError and UnicodeDecodeError exceptions. An attacker can trigger these crashes by sending POST requests with non-ASCII bytes, resulting in HTTP 500 errors and file descriptor leaks. This enables a denial of service attack against legitimate users of the interface.
Exploitability
The vulnerability is rated as medium severity with a CVSS 3.1 score of 5.3, indicating it is network-accessible with low attack complexity. While the EPSS score of 0.005 suggests a relatively low probability of exploitation, the vulnerability is not currently listed in the CISA Known Exploited Vulnerabilities catalog.
Remediation
- Upgrade the urwid package to version 4.0.7 or later.
- If upgrading is not immediately possible, disable the urwid web display interface to mitigate the risk.
How to check your project
- Check the project's dependency manifest (e.g., requirements.txt, pyproject.toml, or setup.py) for an urwid version less than 4.0.7.
- Inspect the environment's installed package list using 'pip show urwid' to confirm the currently running version.
Automated analysis of the published advisory data, generated 2026-11-18. Not human-reviewed; verify against the official advisory. How this works.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | Upgrade |
|---|---|---|---|---|
| PyPI | urwid |
>= 0, < 4.0.7 | 4.0.7 | python -m pip install 'urwid>=4.0.7' |
CVSS 3.1 vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
| Attack vector | Network |
|---|---|
| Attack complexity | Low |
| Privileges required | None |
| User interaction | None |
| Scope | Unchanged |
| Confidentiality | None |
| Integrity | None |
| Availability | Low |
FAQ
What is the primary cause of the DoS condition?
The handle_short_request function attempts to encode non-ASCII POST input into ASCII, which triggers an unhandled UnicodeEncodeError and crashes the CGI process.
Are there any side effects beyond the service crashing?
Yes, a file descriptor leak occurs because the function fails to close the descriptor before the exception propagates, impacting the CGI process.
Is this vulnerability actively exploited in the wild?
No, this vulnerability is not listed in the CISA Known Exploited Vulnerabilities catalog.
Original advisory description
References
- WEB https://github.com/urwid/urwid/security/advisories/GHSA-cp25-j9x5-p5xm
- ADVISORY https://nvd.nist.gov/vuln/detail/CVE-2026-103022
- WEB https://github.com/urwid/urwid/pull/1201
- WEB https://github.com/urwid/urwid/commit/b79d9a96843a6f5950bb2bfab5d059bdc61c538b
- PACKAGE https://github.com/urwid/urwid
- WEB https://github.com/urwid/urwid/releases/tag/4.0.7
Source records: GHSA-cp25-j9x5-p5xm (OSV.dev) · EPSS by FIRST, 2026-11-26.