Skip to main content

NiceGUI CVE-2026-45554

| EUVDEUVD-2026-33965 MEDIUM
Uncaught Exception (CWE-248)
2026-05-18 https://github.com/zauberzeug/nicegui GHSA-pq7c-x8g4-rvp6
5.3
CVSS 3.1 · Vendor: https://github.com/zauberzeug/nicegui
View

Attack ChainAIDerived

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

  1. Access
    Identify internet-exposed NiceGUI server
  2. Delivery
    Send GET request to /_nicegui/<version>/resources/<key>/<directory-path>
  3. Exploit
    pathlib.Path.exists() returns True for directory
  4. Execution
    FileResponse raises unhandled RuntimeError
  5. Persist
    Uvicorn logs ~100-line traceback per request
  6. Impact
    Repeat at high rate to exhaust disk or saturate log pipeline

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A10:2025 - Mishandling of Exceptional Conditions
ASVS 5.0
V16 - Security Logging and Error Handling Exception handling completeness
Exploitation Conditions

No special conditions are required beyond the target running NiceGUI version 1.4.6-3.11.1 and being reachable over a network. The CVSS vector (AV:N/AC:L/PR:N/UI:N) confirms remote unauthenticated exploitation with low complexity against default configurations. The specific triggering condition is a sub-path under /_nicegui/<version>/resources/<key>/ or /_nicegui/<version>/esm/<key>/ that resolves to an existing directory on the server's filesystem. Exploitation is bounded by: (1) the specific URL prefixes being targeted (other NiceGUI routes such as /static/, /components/, and /libraries/ are not affected); (2) the absence of impact to confidentiality or integrity - the only observable data leaked is the absolute installation path already present in any uncaught exception trace; (3) no privilege escalation or lateral movement vector identified.

Impact

The CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L) scores 5.3 Medium, reflecting low-complexity network-reachable exploitation with availability impact only, which aligns well with the described impact. Real-world risk is operational rather than a security breach: sustained requests can exhaust disk space, saturate log-shipping pipelines (e.g., Splunk, Elasticsearch, Datadog ingest quotas), and generate alert fatigue or mask legitimate security events. The absence of confidentiality or integrity impact means this is not a data-breach vector. No EPSS score was provided; without it, exploitation probability cannot be quantified, but the low technical barrier (unauthenticated, low complexity) means the attack surface is broad for any internet-exposed NiceGUI instance. No CISA KEV listing and no public exploit code have been identified, reducing urgency relative to a CVSS score alone might suggest. The provided tags (RCE, Path Traversal, Information Disclosure) conflict with the advisory's explicit statements - they appear to be erroneous and should not factor into risk decisions. Defenders should prioritize patching for internet-facing NiceGUI deployments given the zero-authentication barrier.

Exploit ScenarioDerived

An attacker with network access to a publicly reachable NiceGUI server sends a high volume of HTTP GET requests to /_nicegui/<version>/resources/<key>/ or /_nicegui/<version>/esm/<key>/ where the trailing sub-path resolves to a directory rather than a file. Each request passes the exists() guard, causes FileResponse to raise an unhandled RuntimeError, and results in Uvicorn writing approximately 100 lines of Python traceback to the log. At modest request rates (e.g., a few hundred requests per second from a single host), this can fill disk partitions or saturate log ingest pipelines within minutes on a default deployment. No public exploit code has been identified, but the attack requires no authentication and no specialized tooling - standard HTTP clients suffice.

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

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

Alert me

AnalysisAIv1 – May 18, 2026

Log-volume denial of service in NiceGUI's dynamic static-asset routes allows remote unauthenticated attackers to flood server logs and exhaust disk or log-pipeline capacity. The two affected routes - the per-component resource route (introduced in v1.4.6) and the ESM module route (introduced in v3.0.0) - fail to distinguish directories from files before passing user-controlled paths to Starlette's FileResponse, triggering an unhandled RuntimeError that Uvicorn logs as a full multi-frame traceback (~100 lines per request). Versions up to and including 3.11.1 are affected; the fix is available in 3.12.0. No public exploit or CISA KEV listing has been identified at time of analysis. IMPORTANT: The provided tags (RCE, Path Traversal, Information Disclosure) are directly contradicted by the advisory, which explicitly states there is no remote code execution, no path traversal, and no data exposure - these tags should be treated as erroneous metadata.

RemediationAI

The primary remediation is to upgrade NiceGUI to version 3.12.0, which resolves the unhandled exception in both the resource and ESM module routes (vendor-released patch: 3.12.0, per GHSA-pq7c-x8g4-rvp6 at https://github.com/zauberzeug/nicegui/security/advisories/GHSA-pq7c-x8g4-rvp6). For deployments that cannot upgrade immediately, three compensating controls are available with noted trade-offs: (1) Configure a reverse proxy (nginx, Caddy, Traefik) to reject requests where the sub-path after /_nicegui/<version>/esm/<key>/ or /_nicegui/<version>/resources/<key>/ is empty - this blocks the specific directory-trigger pattern but requires accurate path matching and maintenance as NiceGUI versions change; (2) Rate-limit all requests to the /_nicegui/ prefix at the proxy layer, which reduces amplification impact but does not eliminate the error condition and may affect legitimate asset loading under high concurrency; (3) Configure aggressive log rotation (e.g., logrotate with size-based triggers, or Uvicorn log level raised to ERROR) - this bounds disk exhaustion but does not prevent log-pipeline saturation and may reduce observability for other events.

Affected VersionsENISA

nicegui < 3.12.0

Affected Packages

pypi nicegui fix: 3.12.0

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

NiceGUI is a Python web UI framework built on FastAPI and Starlette, served by Uvicorn. The two affected routes construct filesystem paths by joining a user-supplied sub-path segment with a registered base directory, then call pathlib.Path.exists() as a guard before invoking Starlette's FileResponse. The flaw (CWE-248: Uncaught Exception) lies in pathlib.Path.exists() returning True for both files and directories - FileResponse is designed exclusively for files and raises a RuntimeError when handed a directory path. Because FastAPI has no default handler for RuntimeError (as opposed to HTTPException), the exception propagates to Uvicorn unhandled, producing a 500 response to the client and a full Python traceback in the server log. The affected package is pkg:pip/nicegui, versions <= 3.11.1. Other NiceGUI-served prefixes (/static/, /components/, /libraries/) do not share this sub-path-to-FileResponse pattern and are not affected.

Know when the next one hits your stack

  • 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 (https://github.com/zauberzeug/nicegui) PRIMARY 5.3 MEDIUM
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L

Primary rating from Vendor (https://github.com/zauberzeug/nicegui) · only source for this CVE.

CVSS VectorVendor: https://github.com/zauberzeug/nicegui

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

DescriptionCVE.org

Summary

Two FastAPI routes that serve per-component static assets in NiceGUI accept a sub-path parameter that may resolve to a directory rather than a file. Requests that resolve to a directory raise an unhandled RuntimeError inside Starlette's FileResponse, which Uvicorn writes to the server log as a full traceback. Because the routes are reachable without authentication, a remote attacker can amplify log volume and consume disk and log-pipeline capacity on any publicly reachable NiceGUI server. There is no impact to confidentiality or integrity.

Details

The affected routes are the per-component resource route (added in v1.4.6) and the ESM module route (added in v3.0.0). Both join a user-supplied path segment with a registered base directory and pass the result to FileResponse. The existing existence check uses pathlib.Path.exists(), which returns True for directories - so a request whose sub-path resolves to a directory passes the guard and triggers an unhandled exception inside Starlette.

FastAPI has no default handler for RuntimeError, so each such request results in a 500 response and a multi-frame traceback in the server log.

Other NiceGUI-served paths (/static/..., /components/..., /libraries/...) are not affected; they do not use the same sub-path-to-FileResponse pattern.

Impact

A remote, unauthenticated attacker can repeatedly trigger the error condition with crafted requests. Each request emits roughly 100 lines of traceback in a default setup, and more when additional middleware layers are present. At sustained request rates this can:

  • exhaust disk space on hosts with default log retention,
  • saturate downstream log-shipping pipelines,
  • generate alert fatigue or mask other events in monitoring.

There is no remote code execution, no path traversal, and no data exposure beyond the absolute installation path that already appears in any uncaught exception trace.

Workarounds

For deployments that cannot upgrade immediately:

  • Place NiceGUI behind a reverse proxy that rejects requests where the path after /_nicegui/<version>/esm/<key>/ or /_nicegui/<version>/resources/<key>/ is empty.
  • Rate-limit the /_nicegui/ prefix at the proxy.
  • Configure log rotation aggressively for the affected service.

Threat Intelligence Overview

EPSS Score
0.2%
Top 60% exploitable
Threat Intel
1
1 source
Data Quality
5 sources
Confidence: Medium

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 No
EPSS 0.2%
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
None
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact· derived
Medium

Priority Score

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

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

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