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.
Published: 2026-11-06
Score: 5.3 Medium
EPSS: n/a
KEV: No
Impact: Denial of Service
Action: Apply Patch
AI Analysis

Impact

Urwid, a Python console user interface library, contains a flaw in handle_short_request() where unguarded character encoding is performed on POST data and unguarded UTF-8 decoding on polling output. An attacker who obtains a valid X-Urwid-ID session token can send non‑ASCII POST content that triggers a UnicodeEncodeError, and/or cause UnicodeDecodeError from polling output. These exceptions result in the CGI handler returning an error and terminating the request, while the POST path also leaves an open file descriptor, allowing repeated requests to exhaust system resources. The principal effect is a denial of service to the web‑display interface; confidentiality or integrity are not directly compromised.

Affected Systems

All deployments of Urwid that use the web display interface and invoke handle_short_request() before version 4.0.7 are vulnerable. This includes applications that embed Urwid for console‑based web interaction where a POST request is accepted. Versions 4.0.7 and later contain the fix and are not affected.

Risk and Exploitability

The CVSS score of 5.3 indicates moderate severity, and the vulnerability is not listed in the CISA KEV catalog. Exploitation requires possession of a valid X-Urwid-ID session token, which may be obtained through other authentication weaknesses or social engineering. Once a token is available, an attacker can repeatedly trigger the denial‑of‑service condition via crafted POST requests, potentially exhausting file descriptors and rendering the interface unavailable. The lack of an EPSS score means current exploitation probability is uncertain, but the presence of a remote trigger and lack of strict input validation make the risk non‑negligible.

Generated by OpenCVE AI on November 6, 2026 at 22:20 UTC.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Install Urwid 4.0.7 or a newer release to apply the vendor‑issued fix.
  • If upgrading is not immediately possible, disable or remove the vulnerable web display interface from production environments.
  • Add application‑level validation to reject non‑ASCII POST data or ensure that all incoming data is safely encoded and decoded before processing.

Generated by OpenCVE AI on November 6, 2026 at 22:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 06 Nov 2026 23:00:00 +0000

Type Values Removed Values Added
First Time appeared Urwid
Urwid urwid
Vendors & Products Urwid
Urwid urwid

Fri, 06 Nov 2026 21:45:00 +0000

Type Values Removed Values Added
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.
Title Urwid: handle_short_request() crashes on non-ASCII POST body (UnicodeEncodeError DoS)
Weaknesses CWE-116
CWE-248
CWE-775
References
Metrics cvssV3_1

{'score': 5.3, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-11-06T21:33:37.028Z

Reserved: 2026-09-29T21:13:24.031Z

Link: CVE-2026-103022

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-11-06T22:17:49.920

Modified: 2026-11-06T22:17:49.920

Link: CVE-2026-103022

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-11-06T22:45:11Z

Weaknesses
  • CWE-116

    Improper Encoding or Escaping of Output

  • CWE-248

    Uncaught Exception

  • CWE-775

    Missing Release of File Descriptor or Handle after Effective Lifetime