{"id":"CVE-2026-103022","kind":"vulnerability","aliases":["CVE-2026-103022"],"related":[],"title":"Urwid: crafted web input crashes handler and leaks file descriptors","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.","summary":"Urwid is a Python console UI library whose web display handler mishandles non-ASCII POST input and non-UTF-8 output without guards. An attacker holding a valid session token can make the CGI handler error out and leak file descriptors, enabling denial of service of the web display interface.","severity":"medium","cvss":5.3,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["package","python","urwid","web-display"],"not_affected_if":["auth-required","console-only-use","no-web-display"],"how_to_check":"- Check the installed Urwid version with `pip show urwid` or `python -c \"import urwid; print(urwid.__version__)\"`\n- Look for applications that use the web display module (urwid/display/web.py) and are reachable by users","fix":"- Urwid: move to `4.0.7` or later","status":"open","published_at":"2026-11-06T22:17:49+00:00","first_seen_at":"2026-11-06T22:44:32+00:00","triaged_at":"2026-11-06T22:44:51+00:00","updated_at":"2026-11-06T22:44:51+00:00","category":"package","confidence":0.7,"triage":{"at":"2026-11-06T22:44:51Z","model":"claude-haiku-5-5","output":{"fix":"- Urwid: move to `4.0.7` or later","reach":"network","title":"Urwid: crafted web input crashes handler and leaks file descriptors","impact":"low","summary":"Urwid is a Python console UI library whose web display handler mishandles non-ASCII POST input and non-UTF-8 output without guards. An attacker holding a valid session token can make the CGI handler error out and leak file descriptors, enabling denial of service of the web display interface.","audience":"developers","category":"package","nicknames":[],"who_cares":["python","urwid","web-display"],"confidence":0.7,"fix_status":"available","needs_auth":"yes","worst_case":"Web display interface becomes unavailable through repeated denial-of-service requests","analyst_note":"","how_to_check":"- Check the installed Urwid version with `pip show urwid` or `python -c \"import urwid; print(urwid.__version__)\"`\n- Look for applications that use the web display module (urwid/display/web.py) and are reachable by users","plain_action":"","needs_analyst":false,"not_affected_if":["console-only-use","no-web-display","auth-required"],"who_is_affected":"Only applications that use Urwid's web display module (urwid/display/web.py) to serve a browser-based terminal UI are exposed. Console-only Urwid applications do not run this code path. The attacker needs a valid X-Urwid-ID session token, so exposure depends on how sessions are issued and who can reach the web interface.","user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"unknown"},"cost_usd":0.00071,"input_tokens":4387,"output_tokens":542,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-103022':13A,16A '-2026':12A,15A '-8':102C '4.0.7':86C,188C '8':44B,136C 'also':157C 'ascii':37B,126C 'attack':49B,111C 'caus':141C,173C 'cgi':58B,143C,166C 'charact':94C 'consol':27B,78C 'craft':2A 'crash':5A 'cve':11A,14A 'data':128C 'decod':103C 'denial':67B,174C 'descriptor':10A,65B,162C 'display':22B,32B,73B,180C 'enabl':66B 'encod':95C 'error':60B,148C 'except':155C 'file':9A,64B,161C 'fix':185C 'guard':47B 'handl':87C 'handler':6A,33B,59B,144C 'hold':50B 'id':119C 'input':4A,39B,98C 'interfac':74B,80C,181C 'issu':183C 'leak':8A,63B 'leav':158C 'librari':29B,81C 'lifetim':168C 'make':56B 'mishandl':34B 'non':36B,42B,125C,134C 'non-ascii':35B,124C 'non-utf':41B,133C 'obtain':113C 'open':160C 'output':45B,108C,138C 'packag':17B 'path':156C 'perform':92C 'poll':105C,137C 'post':38B,97C,127C,154C 'prior':84C 'process':152C,167C 'python':18B,26B,83C 'rais':130C,139C 'remot':110C 'repeat':170C 'request':89C,151C,171C 'return':146C 'servic':69B,176C 'session':53B,120C 'short':88C 'socket':107C 'submit':123C 'termin':150C 'token':54B,121C 'ui':28B 'unclos':163C 'unguard':93C,100C 'unicodedecodeerror':140C 'unicodeencodeerror':131C 'updat':106C 'urwid':1A,19B,23B,75C,118C 'urwid/display/web.py':91C 'user':79C 'utf':43B,101C,135C 'valid':52B,115C 'version':187C 'web':3A,21B,31B,72B,179C 'web-display':20B 'whose':30B 'without':46B 'x':117C 'x-urwid-id':116C","nicknames":[],"mitigations":[],"who_affected":"Only applications that use Urwid's web display module (urwid/display/web.py) to serve a browser-based terminal UI are exposed. Console-only Urwid applications do not run this code path. The attacker needs a valid X-Urwid-ID session token, so exposure depends on how sessions are issued and who can reach the web interface.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":[],"ptokens":[],"labels":["medium","package","python","urwid","webdisplay"],"campaign_type":null,"search_a":"'-103022':13A,16A '-2026':12A,15A 'craft':2A 'crash':5A 'cve':11A,14A 'descriptor':10A 'file':9A 'handler':6A 'input':4A 'leak':8A 'urwid':1A 'web':3A","search_b":"'8':44B 'ascii':37B 'attack':49B 'cgi':58B 'consol':27B 'denial':67B 'descriptor':65B 'display':22B,32B,73B 'enabl':66B 'error':60B 'file':64B 'guard':47B 'handler':33B,59B 'hold':50B 'input':39B 'interfac':74B 'leak':63B 'librari':29B 'make':56B 'mishandl':34B 'non':36B,42B 'non-ascii':35B 'non-utf':41B 'output':45B 'packag':17B 'post':38B 'python':18B,26B 'servic':69B 'session':53B 'token':54B 'ui':28B 'urwid':19B,23B 'utf':43B 'valid':52B 'web':21B,31B,72B 'web-display':20B 'whose':30B 'without':46B","search_c":"'-8':102C '4.0.7':86C,188C '8':136C 'also':157C 'ascii':126C 'attack':111C 'caus':141C,173C 'cgi':143C,166C 'charact':94C 'consol':78C 'data':128C 'decod':103C 'denial':174C 'descriptor':162C 'display':180C 'encod':95C 'error':148C 'except':155C 'file':161C 'fix':185C 'handl':87C 'handler':144C 'id':119C 'input':98C 'interfac':80C,181C 'issu':183C 'leav':158C 'librari':81C 'lifetim':168C 'non':125C,134C 'non-ascii':124C 'non-utf':133C 'obtain':113C 'open':160C 'output':108C,138C 'path':156C 'perform':92C 'poll':105C,137C 'post':97C,127C,154C 'prior':84C 'process':152C,167C 'python':83C 'rais':130C,139C 'remot':110C 'repeat':170C 'request':89C,151C,171C 'return':146C 'servic':176C 'session':120C 'short':88C 'socket':107C 'submit':123C 'termin':150C 'token':121C 'unclos':163C 'unguard':93C,100C 'unicodedecodeerror':140C 'unicodeencodeerror':131C 'updat':106C 'urwid':75C,118C 'urwid/display/web.py':91C 'user':79C 'utf':101C,135C 'valid':115C 'version':187C 'web':179C 'x':117C 'x-urwid-id':116C","first_public_at":"2026-07-25T09:31:58+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-103022","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-103022","severity":null,"published_at":"2026-11-06T22:17:49+00:00","modified_at":"2026-11-06T22:17:49+00:00","first_seen_at":"2026-11-06T22:44:32+00:00","fetched_at":"2026-11-06T22:44:32+00:00","note":null}],"documents":[{"id":90723,"url":"https://github.com/urwid/urwid/commit/b79d9a96843a6f5950bb2bfab5d059bdc61c538b","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":90724,"url":"https://github.com/urwid/urwid/releases/tag/4.0.7","title":"Release notes: github.com","kind":"release","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release notes: github.com"},{"id":90725,"url":"https://github.com/urwid/urwid/security/advisories/GHSA-cp25-j9x5-p5xm","title":"Vendor advisory: github.com","kind":"vendor","source":"nvd","publisher":"vendor","text":null,"published_at":"2026-07-25T09:31:58+00:00","relation":"advisory","confidence":null,"note":"Vendor advisory: github.com"}],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}