---
schema_version: '1.0'
id: security-20260812-86573b
title: 'CVE-2026-45554: NiceGUI: Unauthenticated log-volume denial of service in dynamic
  resource routes'
url: https://osv.dev/vulnerability/PYSEC-2026-2680
url_hash: 86573b490bca1ecffbfc448d09017f72517f9fa9b0246c30627e022a34150edf
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-2680
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-45554
- PYSEC-2026-2680
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- nicegui
- PyPI
lang: en
published_at: '2026-07-13T15:19:09Z'
fetched_at: '2026-08-12T16:00:04.524216Z'
updated_at: '2026-08-22T14:45:12Z'
status: published
content_hash: 877a8fdf3af7dc2cc946cdc19bbbf08ca6dea41b24617807e626d8c895f99f98
content_changed_at: '2026-08-22T13:15:21.611848Z'
license_note: full
summary: 'NiceGUI: Unauthenticated log-volume denial of service in dynamic resource
  routes'
summary_source: rss
summary_en: 'NiceGUI: Unauthenticated log-volume denial of service in dynamic resource
  routes'
summary_omitted_reason: null
redistribution: true
keywords_en:
- CVE
- CVE-2026-45554
- denial
- dynamic
- library vulnerability
- log-volume
- nicegui
- PyPI
- PYSEC-2026-2680
- resource
- routes
- service
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
- software security
- Unauthenticated
entities_en:
- name: CVE
  type: data
- name: PyPI
  type: artifact
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
computed_at: '2026-08-22T14:45:07Z'
---

# CVE-2026-45554: NiceGUI: Unauthenticated log-volume denial of service in dynamic resource routes

## TL;DR
NiceGUI: Unauthenticated log-volume denial of service in dynamic resource routes

## Key Points
- cve / CVE-2026-45554 / PYSEC-2026-2680 / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L / nicegui / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
**Advisory:** PYSEC-2026-2680 (CVE-2026-45554)

**Details:**
### 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.

**References:**
- https://github.com/zauberzeug/nicegui/security/advisories/GHSA-pq7c-x8g4-rvp6
- https://nvd.nist.gov/vuln/detail/CVE-2026-45554
- https://github.com/zauberzeug/nicegui
- https://github.com/zauberzeug/nicegui/releases/tag/v3.12.0
- https://pypi.org/project/nicegui
- https://github.com/advisories/GHSA-pq7c-x8g4-rvp6

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-2680_

## Source
元記事: [CVE-2026-45554: NiceGUI: Unauthenticated log-volume denial of service in dynamic resource routes](https://osv.dev/vulnerability/PYSEC-2026-2680) — published 2026-07-13T15:19:09Z
