Vulnerabilities in pkg:pypi/nicegui
PACKAGECVE-2026-45554 is a MODERATE (CVSS 5.3) remote code execution vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting NiceGUI libraries in the PyPI ecosystem. The issue involves unauthenticated log-volume denial of service in dynamic resource routes. Remediation is available by upgrading affected packages to version 3.12.0.
pkg:pypi/nicegui
Vulnerability advisories affecting package pkg:pypi/nicegui. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-pq7c-x8g4-rvp6 | CVE-2026-45554 | MODERATE | NiceGUI: Unauthenticated log-volume denial of service in dynamic resource routes |
| GHSA-jfrm-rx66-g536 | CVE-2026-45553 | HIGH | NiceGUI: Local file disclosure via Docutils file insertion in ui.restructured_text() |
| GHSA-9ffm-fxg3-xrhh | CVE-2026-25732 | HIGH | NiceGUI's Path Traversal via Unsanitized FileUpload.name Enables Arbitrary File Write |
| GHSA-w8wv-vfpc-hw2w | CVE-2026-39844 | MODERATE | NiceGUI: Upload filename sanitization bypass via backslashes allows path traversal on Windows |
| GHSA-w5g8-5849-vj76 | CVE-2026-33332 | MODERATE | NiceGUI's unvalidated chunk size parameter in media routes can cause memory exhaustion |
| GHSA-78qv-3mpx-9cqq | CVE-2026-27156 | MODERATE | NiceGUI vulnerable to XSS via Code Injection during client-side element function execution |
| GHSA-v82v-c5x8-w282 | CVE-2026-25516 | MODERATE | NiceGUI's XSS vulnerability in ui.markdown() allows arbitrary JavaScript execution through unsanitized HTML content |
| GHSA-hxp3-63hc-5366 | CVE-2025-66645 | HIGH | NiceGUI has a path traversal in app.add_media_files() allows arbitrary file read |
| GHSA-mp55-g7pj-rvm2 | CVE-2026-21874 | MODERATE | NiceGUI has Redis connection leak via tab storage causes service degradation |
| GHSA-mhpg-c27v-6mxr | CVE-2026-21873 | HIGH | NiceGUI apps which use `ui.sub_pages` vulnerable to zero-click XSS |
| GHSA-m7j5-rq9j-6jj9 | CVE-2026-21872 | MODERATE | NiceGUI apps are vulnerable to XSS which uses `ui.sub_pages` and render arbitrary user-provided links |
| GHSA-7grm-h62g-5m97 | CVE-2026-21871 | MODERATE | NiceGUI is vulnerable to XSS via Unescaped URL in ui.navigate.history.push() / replace() |
| GHSA-2m4f-cg75-76w2 | CVE-2025-66470 | MODERATE | NiceGUI Stored/Reflected XSS in ui.interactive_image via unsanitized SVG content |
| GHSA-72qc-wxch-74mg | CVE-2025-66469 | MODERATE | NiceGUI Reflected XSS in ui.add_css, ui.add_scss, and ui.add_sass via Style Injection |
| GHSA-8c95-hpq2-w46f | CVE-2025-53354 | MODERATE | NiceGUI has a Reflected XSS |
| GHSA-v6jv-p6r8-j78w | CVE-2025-21618 | HIGH | NiceGUI On Air authentication issue |
| GHSA-mwc7-64wg-pgvj | CVE-2024-32005 | HIGH | NiceGUI allows potential access to local file system |
CVE-2026-45554 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L).
How to Fix CVE-2026-45554
To remediate this vulnerability, upgrade all affected NiceGUI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install nicegui>=3.12.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show nicegui
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-45554, inspect your installed packages using pip:
pip show nicegui
Analyze the terminal output to locate any version of NiceGUI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.12.0), your application is affected.
Note: The pip show nicegui command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In NiceGUI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-45554 Affected NiceGUI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nicegui
|
PyPI |
< 3.12.0
|
3.12.0
|
References
Frequently Asked Questions
What is CVE-2026-45554?
Which NiceGUI versions are affected?
What version fixes CVE-2026-45554?
Is nicegui affected?
What is the CVSS score of CVE-2026-45554?
What CWE is associated with CVE-2026-45554?
How can I check PyPI dependencies for CVE-2026-45554?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-pq7c-x8g4-rvp6",
"modified" : "2026-06-09T10:58:12Z",
"published" : "2026-05-18T20:22:07Z",
"aliases" : [ "CVE-2026-45554" ],
"summary" : "NiceGUI: Unauthenticated log-volume denial of service in dynamic resource routes",
"details" : "### Summary\n\nTwo 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.\n\n### Details\n\nThe 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.\n\nFastAPI has no default handler for `RuntimeError`, so each such request results in a 500 response and a multi-frame traceback in the server log.\n\nOther NiceGUI-served paths (`/static/...`, `/components/...`, `/libraries/...`) are not affected; they do not use the same sub-path-to-`FileResponse` pattern.\n\n### Impact\n\nA 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:\n\n- exhaust disk space on hosts with default log retention,\n- saturate downstream log-shipping pipelines,\n- generate alert fatigue or mask other events in monitoring.\n\nThere 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.\n\n### Workarounds\n\nFor deployments that cannot upgrade immediately:\n\n- Place NiceGUI behind a reverse proxy that rejects requests where the path after `/_nicegui/<version>/esm/<key>/` or `/_nicegui/<version>/resources/<key>/` is empty.\n- Rate-limit the `/_nicegui/` prefix at the proxy.\n- Configure log rotation aggressively for the affected service.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "nicegui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.12.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.11.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/zauberzeug/nicegui/security/advisories/GHSA-pq7c-x8g4-rvp6"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45554"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/zauberzeug/nicegui"
}, {
"type" : "WEB",
"url" : "https://github.com/zauberzeug/nicegui/releases/tag/v3.12.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-248", "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-18T20:22:07Z",
"nvd_published_at" : "2026-06-02T16:16:41Z"
}
}