chore(deps): update dependency nicegui to v3.7.0 [security] #418
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.5.0→3.7.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
GitHub Vulnerability Alerts
CVE-2026-25516
Description
The
ui.markdown()component uses themarkdown2library to convert markdown content to HTML, which is then rendered viainnerHTML. By default,markdown2allows raw HTML to pass through unchanged. This means that if an application renders user-controlled content throughui.markdown(), an attacker can inject malicious HTML containing JavaScript event handlers.Unlike other NiceGUI components that render HTML (
ui.html(),ui.chat_message(),ui.interactive_image()), theui.markdown()component does not provide or require asanitizeparameter, leaving applications vulnerable to XSS attacks.Proof of Concept
When this page loads, the JavaScript in the
onerrorhandler executes, potentially allowing an attacker to:Impact
Applications that render user-provided content through
ui.markdown()are vulnerable to stored or reflected XSS attacks. This is particularly concerning for:Remediation
A release has been published in version 3.7.0.
For Users (Immediate Workaround)
Until a fix is released, do not pass untrusted content directly to
ui.markdown(). Instead, use one of these approaches:Option 1: Convert and sanitize manually using
ui.html()Option 2: Escape HTML before markdown conversion (if raw HTML not needed)
Proposed Fix
Add a
sanitizeparameter toui.markdown()consistent with other HTML-rendering components, and/or add anescape_htmlparameter.CVE-2026-25732
Summary
NiceGUI's
FileUpload.nameproperty exposes client-supplied filename metadata without sanitization, enabling path traversal when developers use the patternUPLOAD_DIR / file.name. Malicious filenames containing../sequences allow attackers to write files outside intended directories, with potential for remote code execution through application file overwrites in vulnerable deployment patterns. This design creates a prevalent security footgun affecting applications following common community patterns.Note: Exploitation requires application code incorporating
file.nameinto filesystem paths without sanitization. Applications using fixed paths, generated filenames, or explicit sanitization are not affected.Details
Vulnerable Component:
nicegui/elements/upload_files.py(upload_files.py#L79-L82 and upload_files.py#L110-L115)Affected Methods:
SmallFileUpload.save()andLargeFileUpload.save()Root Cause: The
save()method performs no validation on the provided path parameter. It accepts:../sequencesWhen developers use
e.file.name(controlled by the attacker) in constructing save paths, directory traversal occurs:PoC
Impact
Affected Applications: All NiceGUI applications using
ui.upload()where developers save files withe.file.save()and include user-controlled filenames (e.g.,e.file.name) in the path.Attack Capabilities:
Exploitability: Trivially exploitable without authentication. Attackers simply upload a file with a malicious filename like
../../../app.pyto escape the upload directory. The vulnerability is prevalent in production applications as developers naturally usee.file.namedirectly, following patterns shown in community examples.Remediation
For Users
For Maintainers
Release Notes
zauberzeug/nicegui (nicegui)
v3.7.0Compare Source
Security
ui.markdown()(GHSA-v82v-c5x8-w282 by @falkoschindler, @evnchn)FileUpload.nameenabling arbitrary file write (GHSA-9ffm-fxg3-xrhh by @k14uz, @evnchn, @falkoschindler)New features and enhancements
on_connectcalled before page is ready (#5673 by @evnchn, @falkoschindler)checkboxRendererin favor of built-inagCheckboxCellRenderer(#5681, #5685 by @CatamountJack, @CrystalWindSnake, @falkoschindler, @evnchn)ui.interactive_imagewith PIL images (#5583, #5653 by @denniswittich, @evnchn, @falkoschindler)Bugfixes
app.shutdownforui.run_with(#3253, #5686 by @MuuXB, @python-and-novella, @falkoschindler, @evnchn, @falkoschindler)NiceGUIJSONResponseto inherit fromJSONResponseso response model schema appears in Swagger (#5688, #5689 by @AleDetto, @evnchn, @falkoschindler)ui.expansionstutters during animation (#4918, #5659 by @platinops, @evnchn, @falkoschindler)ui.dialog(#2149, #5652 by @adosikas, @meslahik, @python-and-novella, @liunux4odoo, @evnchn, @falkoschindler)Documentation
Testing
tab_idin User fixture (#5687, #5690 by @5553455237, @evnchn, @falkoschindler)Dependencies
uv.lockto revision 3 (#5707 by @evnchn, @falkoschindler)Infrastructure
contextlib.suppressto ignore exceptions (#5714 by @falkoschindler, @evnchn)Special thanks to our top sponsors Lechler GmbH and TestMu AI ✨
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!
v3.6.1Compare Source
Bugfix
Testing
valuewhen closing aui.selectpopup in User simulation (#4894, #5670 by @briemla, @falkoschindler, @evnchn, @rodja)Special thanks to our top sponsors Lechler GmbH and TestMu AI ✨
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!
v3.6.0Compare Source
New features and enhancements
app.colorsfor global color configuration (#3787, #5611 by @ghbm-itk, @evnchn, @falkoschindler)set_background_color()andbind_text_color()(#5511, #5512 by @borolepratik, @evnchn, @falkoschindler)ui.on_exceptionfor handling exceptions after the page has been sent to the client (#5617, #5618 by @CatamountJack, @evnchn, @falkoschindler)ui.altairaccept any Altair chart type likeLayerChartorFacetChart(#5649, #5650 by @s-meza, @falkoschindler)ui.run(show=...)to open a specific page (#5642 by @jsb-zz, @falkoschindler, @evnchn)ui.tabsandui.tab_panelsalways emit change values as string (#5637, #5638 by @jeffective, @evnchn, @falkoschindler)ui.sceneloses the WebGL context (#5360, #5656 by @falkoschindler, @evnchn)Bugfixes
ui.add_cssafter client connected (#5624, #5628, #5666, #5667 by @svhb1000, @falkoschindler, @evnchn)ui.dialogbeing hidden when created insideui.menu(#4116, #5602 by @tgbl-mk, @evnchn, @falkoschindler)ui.leaflettiles not loading when element is unhidden (#2338, #5614 by @kleynjan, @evnchn, @falkoschindler)ui.logscroll-to-bottom inui.tab_panel(#5118, #5632 by @pandabearcodes, @evnchn, @falkoschindler)ui.anywidgetnot propagating back to frontend (#5626, #5636 by @s-meza, @evnchn, @falkoschindler)Documentation
on_path_changeddemo and reference forSubPagesRouter(#5487, #5665 by @GinjiJizai, @falkoschindler, @evnchn)ui.context.client.connected(#5607 by @jeffective, @falkoschindler, @evnchn)Testing
asyncio_default_fixture_loop_scopesetting (#4785 by @gzu300, @evnchn, @rodja, @falkoschindler)Special thanks to our top sponsors Lechler GmbH and TestMu AI ✨
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: Branch creation - "" in timezone Europe/Berlin, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.