chore(deps): update dependency nicegui to v3.12.0 [security]#70
Open
renovate[bot] wants to merge 1 commit into
Open
chore(deps): update dependency nicegui to v3.12.0 [security]#70renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR contains the following updates:
3.11.1→3.12.0NiceGUI: Local file disclosure via Docutils file insertion in ui.restructured_text()
CVE-2026-45553 / GHSA-jfrm-rx66-g536
More information
Details
Summary
ui.restructured_text()renders reStructuredText server-side with Docutils without disabling file insertion directives.When a NiceGUI application passes attacker-controlled content to
ui.restructured_text(), an attacker can use standard Docutils directives (include,csv-tablewith:file:,rawwith:file:) to read local files readable by the NiceGUI server process.Applications that only pass trusted static strings to
ui.restructured_text()are not affected.Details
The affected component is the reStructuredText renderer:
nicegui/elements/restructured_text.pyprepare_content()prepare_content()renders user-supplied reStructuredText through Docutils:The Docutils call only sets
syntax_highlight. It does not disable file insertion or raw directives, so Docutils processes directives that read local files and embed their contents into the generated HTML before it is returned to the browser. Frontend sanitization cannot prevent this because the file has already been read server-side.A minimal vulnerable usage pattern is any page that forwards untrusted input into
ui.restructured_text(), e.g. content taken from query parameters, form fields, or other user-controlled sources.Impact
Local file disclosure. An attacker who can supply reStructuredText content can read files accessible to the NiceGUI server process. Depending on deployment, this may expose:
.envfilesThe confirmed impact is confidentiality loss through arbitrary local file read. Applications are only impacted when they pass untrusted or user-controlled reStructuredText into
ui.restructured_text().Recommended fix
Disable unsafe Docutils features in
prepare_content():This blocks the
include,csv-table :file:, andraw :file:directives as well as localdocutils.confoverrides.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
NiceGUI: Unauthenticated log-volume denial of service in dynamic resource routes
CVE-2026-45554 / GHSA-pq7c-x8g4-rvp6
More information
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
RuntimeErrorinside Starlette'sFileResponse, 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 usespathlib.Path.exists(), which returnsTruefor 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-FileResponsepattern.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:
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:
/_nicegui/<version>/esm/<key>/or/_nicegui/<version>/resources/<key>/is empty./_nicegui/prefix at the proxy.Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:LReferences
This data is provided by the GitHub Advisory Database (CC-BY 4.0).
Release Notes
zauberzeug/nicegui (nicegui)
v3.12.0Compare Source
Security
ui.restructured_textvia Docutils file insertion directives (GHSA-jfrm-rx66-g536 by @dennyabrahamsinaga, @h3ri0s, @falkoschindler, @evnchn)New features and enhancements
enable(),disable(),set_enabled(),set_visibility()and many more methods chainable (#6014, #6016 by @stragrothsk, @falkoschindler, @evnchn)ui.mermaidcontent likeui.markdowndoes (#6011, #6012 by @BasementSociety, @falkoschindler, @evnchn)KeyboardInterrupttraceback fromrun.cpu_boundworkers on Ctrl-C (#6025, #6027 by @justus2510, @falkoschindler, @evnchn)Bugfixes
RuntimeError: A SemLock created in a fork context is being shared with a process in a spawn contextinui.run(native=True, reload=True)on CPython ≥ 3.11.5 (#1841, #6045 by @swrpug, @evnchn, @falkoschindler, @rodja, @JensOgorek, @yuanxion, @electronstudio, @knoppmyth, @Qhawaq, @sagarbehere, @frankhuurman, @MrGibus, @BanDroid)KeyError: 'error'when callingValidationElement.validate()after theerrorprop was removed viaprops(remove=...)(#5977, #6042 by @manu-ns, @falkoschindler, @evnchn)window.location.reload()on every WebSocket reconnect (#6018, #6019 by @arodidev, @falkoschindler, @evnchn)ElementFilter.DEFAULT_LOCAL_SCOPEat runtime so changing the class variable actually affects new instances (#6005, #6013 by @gzu300, @DarkRiddle1212, @falkoschindler)app.timerand lifecycle handler (on_connect,on_disconnect,on_delete,on_shutdown,on_exception) registration in script mode (#6003, #6006 by @EchterTimo, @falkoschindler, @evnchn)ui.aggrid.from_pandasandui.table.from_pandas(#5995, #6002 by @NichtJens, @DarkRiddle1212, @falkoschindler, @evnchn)Note: DataFrames with an informative index now produce additional column(s) in the resulting grid/table. To restore the previous "drop the index" behavior, call
df.reset_index(drop=True)before passing the DataFrame.ui.codereporting the wrong language and throwing aReferenceErrorin the CodeMirrorfindLanguageerror path (#5982 by @Jepson2k, @falkoschindler)ui.scene(#3515, #5708 by @maria-korosteleva, @evnchn, @falkoschindler, @fabian0702)Documentation
llms.md— a self-contained LLM reference covering NiceGUI's API surface, mental models, and common anti-patterns for AI-assisted development (#6021, #6049 by @joko-zauberzeug, @falkoschindler, @evnchn, @rodja)Sortabledocumentation (#6017 by @falkoschindler, @denniswittich)client_idsecurity model and add an "Examples Are Starting Points" callout (#6004 by @evnchn, @falkoschindler)ui.sub_pagesdoc demo link target and label (#5999, #6008 by @aisartag, @falkoschindler, @evnchn)Testing
Note 1: Click handlers on
ui.checkboxandui.switchnow receivee.args = Noneinstead ofnot element.value; reade.sender.value(or useon_value_change) for the post-toggle value.Note 2: Also,
find(...).click()no longer broadcasts to every matched element — it picks the lowest-ID enabled match and dispatches once. Tests that relied on simultaneous multi-match clicks need to issue separate calls.ui.sub_pagesnavigation in user-simulated tests (#5193 by @rodja, @falkoschindler)Dependencies
Infrastructure
uv sync --lockedin CI workflows so lockfile drift fails fast with a clear diagnostic (#6036 by @evnchn, @falkoschindler)uv sync --lockedin Copilot setup steps for deterministic agent boot environments (#6040 by @evnchn, @falkoschindler)pipecosystem touv(#6037 by @evnchn, @falkoschindler)[project.urls]with PEP 753 well-known labels (#6039 by @evnchn, @falkoschindler)Special thanks to our top sponsors TestMu AI, Lechler GmbH and joet-s ✨
and all our other sponsors and contributors for supporting this project!
🙏 Want to support this project? Check out our GitHub Sponsors page to help us keep building amazing features!
Configuration
📅 Schedule: (in timezone Europe/Berlin)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.