# CVE-2026-25732: NiceGUI path traversal in FileUpload.save

Source: https://junglewise.ai/threats/cve-2026-25732-nicegui-path-traversal-in-fileupload-save  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-02-05. Updated: 2026-06-06  
License: CC BY 4.0 with a link back

CVE-2026-25732 · Severity: high · CVSS 7.5 · Published 2026-02-05

NiceGUI is a Python framework used to build web-based user interfaces. A vulnerability in its file upload component allows attackers to bypass intended storage folders and write files to arbitrary locations on the server. This could allow an attacker to overwrite critical application files, potentially leading to full system takeover or service disruption.

Technologies: [nicegui (PyPI)](https://junglewise.ai/threats/technologies/nicegui). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-25732 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-25732 being exploited in the wild.

**How severe is CVE-2026-25732?** High severity, with a CVSS score of 7.5, published 5 February 2026.

**Which products and versions are affected?** nicegui (PyPI) <= 3.6.1, ECOSYSTEM:introduced=0,fixed=3.7.0.

**Is there a fix for CVE-2026-25732?** Yes. nicegui (PyPI): upgrade to 3.7.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-25732 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-25732?** Check whether you run nicegui (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- nicegui (PyPI): upgrade to 3.7.0 or later

  ```sh
  pip install "nicegui>=3.7.0"
  ```


## Technical details

A path traversal vulnerability exists in NiceGUI's `SmallFileUpload.save()` and `LargeFileUpload.save()` methods within `nicegui/elements/upload_files.py`. The `FileUpload.name` property contains unsanitized client-supplied metadata, including directory traversal sequences like `../`. When application code constructs a filesystem path using this property (e.g., `UPLOAD_DIR / e.file.name`), an attacker can specify an absolute path or a relative path that escapes the intended directory. This allows for arbitrary file writes and potential remote code execution (RCE) if the attacker overwrites application source code or configuration files. The issue is addressed in version 3.7.0.

## Affected products

- zauberzeug nicegui <= 3.6.1

## Identifiers

- CVE-2026-25732
- GHSA-9ffm-fxg3-xrhh
- PYSEC-2026-95

## Timeline

- 2026-02-05: disclosed
- 2026-02-05: advisory
- 2026-02-05: patched: Fixed in version 3.7.0

## References

- [https://api.github.com/users/k14uz](https://api.github.com/users/k14uz)
- [https://github.com/k14uz](https://github.com/k14uz)
- [https://api.github.com/users/k14uz/gists%7B/gist_id%7D](https://api.github.com/users/k14uz/gists%7B/gist_id%7D)
- [https://api.github.com/users/k14uz/repos](https://api.github.com/users/k14uz/repos)
- [https://avatars.githubusercontent.com/u/85698684?v=4](https://avatars.githubusercontent.com/u/85698684?v=4)
- [https://api.github.com/users/k14uz/events%7B/privacy%7D](https://api.github.com/users/k14uz/events%7B/privacy%7D)

## Related threats

- [PYSEC-2026-1703 - NiceGUI has Redis connection leak via tab storage causes service degradation](https://junglewise.ai/threats/cve-2026-21874-nicegui-has-redis-connection-leak-via-tab-storage-causes-service)
- [PYSEC-2026-1702 - NiceGUI apps which use `ui.sub_pages` vulnerable to zero-click XSS](https://junglewise.ai/threats/cve-2026-21873-nicegui-apps-which-use-ui-sub-pages-vulnerable-to-zero-click-xss)
- [PYSEC-2026-1701 - NiceGUI apps are vulnerable to XSS which uses `ui.sub_pages` and render arbitrary user-provided links](https://junglewise.ai/threats/cve-2026-21872-nicegui-apps-are-vulnerable-to-xss-which-uses-ui-sub-pages-and)
- [PYSEC-2026-1698 - NiceGUI is vulnerable to XSS via Unescaped URL in ui.navigate.history.push() / replace()](https://junglewise.ai/threats/cve-2026-21871-nicegui-is-vulnerable-to-xss-via-unescaped-url-in-ui-navigate)
- [PYSEC-2026-1697 - NiceGUI Reflected XSS in ui.add_css, ui.add_scss, and ui.add_sass via Style Injection](https://junglewise.ai/threats/cve-2025-66469-nicegui-reflected-xss-in-ui-add-css-ui-add-scss-and-ui-add-sass)
