Skip to main content

Urwid EUVDEUVD-2026-118521

| CVE-2026-103022 MEDIUM
Improper Encoding or Escaping of Output (CWE-116)
2026-11-06 GitHub_M GHSA-cp25-j9x5-p5xm
5.3
CVSS 3.1 · Vendor: GitHub_M
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Observe X-Urwid-ID token in plaintext headers
  2. Exploit
    Send POST with non-ASCII bytes
  3. Execution
    Trigger unhandled UnicodeEncodeError
  4. Impact
    Crash 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.

This Month Plan within 30 days. Why: MEDIUM severity (CVSS 4.0-6.9).
Patch available 0.5% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

urwid < 4.0.7

Affected Packages

pypi urwid fix: 4.0.7

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

Vendor (GitHub_M) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
vuln.today AI 5.3 MEDIUM

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).

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (GitHub_M).

CVSS VectorVendor: GitHub_M

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
Low

Lifecycle Timeline

1
Patch available
Nov 06, 2026 - 22:03 EUVD

DescriptionCVE.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

EPSS Score
0.5%
Top 59% exploitable
Prevalence
Medium
popular Python TUI library, but web display mode rarely enabled in production
Threat Intel
1
1 sources
Exploit
POC
Public exploit code exists
Social Media
1
Sightings
Data Quality
6 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC Yes
EPSS 0.5%
Patch available Yes
Active threat No
Deciding rule
MEDIUM severity (CVSS 4.0-6.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

46
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy