NiceGUI's Path Traversal via Unsanitized FileUpload.name Enables Arbitrary File Write
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
niceguiPyPI | < 3.7.0 | 3.7.0 |
Affected products
2- Range: < 3.7.0
Patches
Vulnerability mechanics
References
6- github.com/advisories/GHSA-9ffm-fxg3-xrhhghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-25732ghsaADVISORY
- github.com/pypa/advisory-database/tree/main/vulns/nicegui/PYSEC-2026-95.yamlghsaWEB
- github.com/zauberzeug/nicegui/blob/main/nicegui/elements/upload_files.pyghsax_refsource_MISCWEB
- github.com/zauberzeug/nicegui/blob/main/nicegui/elements/upload_files.pyghsax_refsource_MISCWEB
- github.com/zauberzeug/nicegui/security/advisories/GHSA-9ffm-fxg3-xrhhghsax_refsource_CONFIRMWEB
News mentions
0No linked articles in our index yet.