cvelo
P3 · MediumCVSS 5.3EPSS 0.6%

Urwid: handle_short_request() crashes on non-ASCII POST body (UnicodeEncodeError DoS)

  • CVE-2026-103022
  • GHSA-cp25-j9x5-p5xm
  • EUVD-2026-118521

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.

Text from the CVE.org record.

Recommendation

No source states a fixed version. Check the vendor advisory.

Affected

  • urwid

    Affected versionsFixed in
    < 4.0.7none stated
  • urwidPyPI

    Affected versionsFixed in
    up to 4.0.6none stated

Product versions from the CVE.org record.

Timeline

  1. Published

Related news

No article from the followed outlets names this vulnerability.