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

Published Nov 6, 2026
·
Updated

Urwid is a console user interface library for Python. Prior to 4.0.7, handleshortrequest() 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.

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade urwid to a version that resolves this vulnerability.

    Fixed in 4.0.7

Event History

Nov 6, 2026
CVE Published
via MITRE·09:33 PM
Data Sourced
via MITRE·09:33 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·10:17 PM
DescriptionSeverityWeakness

Frequently Asked Questions

1

Which deployments are exposed to this denial of service?

Deployments using Urwid's web display CGI handler are affected prior to version 4.0.7. The issue impacts the web display interface rather than Urwid usage generally.

2

What does an attacker need to trigger the POST-body crash?

The attacker must obtain a valid X-Urwid-ID session token and submit non-ASCII POST data. This can raise UnicodeEncodeError and terminate processing of the CGI request.

3

Can repeated exploitation have a cumulative effect?

Yes. The POST exception path leaves an opened file descriptor unclosed for the lifetime of the CGI process, so repeated malicious requests can exhaust file descriptors and deny service to the web display interface.

4

Are polling requests also affected?

Yes. Non-UTF-8 output on the polling update socket can raise UnicodeDecodeError, causing the CGI handler to return an error and terminate request processing.

5

What version resolves the issue?

Upgrade Urwid to version 4.0.7, which fixes the unguarded POST encoding and polling-output UTF-8 decoding behavior.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203