Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObserve X-Urwid-ID token in plaintext headers
-
ExploitSend POST with non-ASCII bytes
-
ExecutionTrigger unhandled UnicodeEncodeError
-
ImpactCrash CGI and leak file descriptor causing DoS
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding for downstream
|
| Exploitation Conditions | Requires the optional urwid web display interface to be deployed as a CGI endpoint (not enabled in typical terminal-only urwid usage), and the attacker must obtain a valid X-Urwid-ID session token - which the advisory notes is transmitted in plaintext HTTP response headers and is therefore observable by a network attacker rather than a strong credential. Given the token, exploitation is simply repeated POST requests containing any byte above 0x7F (non-ASCII), or inducing non-UTF-8 polling socket output. Limiting factors: the web display feature must be explicitly in use, the token must be acquired, and impact is confined to availability of that interface (no code execution, data disclosure, or integrity impact). |
| Impact | This is a genuine but low-urgency availability issue, not a high-priority emergency. The CVSS 3.1 base score is 5.3 (MEDIUM) with vector AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L - network-reachable, low complexity, no privileges or user interaction, with impact limited strictly to availability (C:N/I:N). It is NOT in CISA KEV (KEV=NO), so there is no confirmed active exploitation, and no public exploit identified at time of analysis - the provided references are the GHSA advisory, fixing pull request, patch commit, and release, which are remediation artifacts rather than weaponized exploit code. EPSS is not provided in the input, so probabilistic exploitation likelihood cannot be stated. The vuln.today decision label is 'this_month', consistent with a moderate-severity DoS rather than an act_now/emergency. One nuance the raw CVSS PR:N does not capture: the description and GHSA both state the attacker must first obtain a valid X-Urwid-ID session token; PR:N is defensible only because that token is transmitted in plaintext HTTP response headers and can be observed, so it functions as a weak, obtainable prerequisite rather than true authentication. Net: a real defect worth patching on a normal cycle, but its blast radius is confined to availability of the optional urwid web display interface, keeping real-world priority modest. |
| Exploit ScenarioDerived | An attacker on a network path to a urwid web-display CGI deployment observes a valid X-Urwid-ID token leaked in plaintext HTTP response headers, then sends repeated POST requests whose bodies contain non-ASCII bytes (above 0x7F). Each request triggers an unhandled UnicodeEncodeError that crashes the CGI handler with HTTP 500 and leaks an unclosed file descriptor, and repeating this degrades or denies the web interface for legitimate users. No public exploit identified at time of analysis, though the fixing commit makes the trigger trivial to reconstruct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Nov 06, 2026
Urwid's optional web display interface crashes on malformed input: an attacker holding a valid X-Urwid-ID session token can POST non-ASCII bytes (any byte above 0x7F) to the CGI endpoint, raising an unhandled UnicodeEncodeError that returns HTTP 500 and, in the same code path, leaks an open file descriptor for the life of the CGI process. A parallel defect causes an unhandled UnicodeDecodeError when the polling update socket emits non-UTF-8 data. Repeated requests therefore deny service only to deployments of the urwid web display; terminal-only usage is unaffected, no public exploit code was identified at time of analysis, and the advisory rates it an availability-only issue (CVSS 5.3) rather than a high-priority emergency.
RemediationAI
Upgrade to urwid 4.0.7 or later - the vendor-released patch in https://github.com/urwid/urwid/releases/tag/4.0.7 (implemented by PR https://github.com/urwid/urwid/pull/1201, commit b79d9a96843a6f5950bb2bfab5d059bdc61c538b) adds charset-aware encoding of POST input with an HTTP 400 response on encode failure, a finally block that closes the pipe descriptor, and guarded UTF-8 decoding of polling output that returns HTTP 502 instead of crashing. The vendor states no direct workaround exists short of disabling the urwid web display interface; since the feature is not enabled in typical terminal-only deployments, removing or firewalling the CGI endpoint is a viable compensating control whose trade-off is loss of browser-based access to the UI. Because the X-Urwid-ID session token is transmitted in plaintext HTTP response headers and is observable by a network attacker, also terminate the endpoint behind TLS and restrict it to trusted networks if it cannot be patched immediately; neither measure fixes the underlying exception handling, so upgrading remains the complete fix. Advisory: https://github.com/urwid/urwid/security/advisories/GHSA-cp25-j9x5-p5xm.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Urwid is a Python console/TUI library, and its web display mode (urwid/display/web.py) implements a CGI shim that bridges an HTTP front end to a Unix-domain socket-based session: client keystrokes are read from stdin and written into a named pipe, while screen updates are read back from a per-session socket and echoed to stdout. The root causes map to CWE-116 (improper encoding/neutralization of output) plus CWE-248 (uncaught exception) and CWE-775 (missing release of file descriptor on error). handle_short_request() encoded POST input as ASCII with no guard - a FIXME in the code even noted the encoding should derive from the request - so any non-ASCII byte raised UnicodeEncodeError before the fd opened earlier in the same function was closed; because the exception propagated out of the CGI handler, the descriptor stayed open for the process lifetime and repeated requests accumulate. A second path decoded the polling socket's bytes as UTF-8 without handling UnicodeDecodeError. The fix replaces the hardcoded ASCII encode with a charset negotiated from CONTENT_TYPE via email.message.Message (_request_charset(), defaulting to utf-8), wraps the read/encode in a try/except returning HTTP 400 Bad Request, adds a finally block that closes the descriptor while suppressing OSError, buffers and decodes the polling output under a try/except returning HTTP 502 Bad Gateway, and switches the socket to a context manager. Deployment scope matters: this code only executes when urwid is explicitly run as a web CGI endpoint; standard terminal applications never load it.
Know when Urwid gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
Network CGI endpoint, trivial non-ASCII payload (AC:L); PR:N retained only because the required X-Urwid-ID token leaks in plaintext headers; impact is availability-only (A:L).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
1DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.
EUVD-2026-118521
GHSA-cp25-j9x5-p5xm
NVD
CVE.org
EPSS
VulDB
Exploit-DB