CVE-2026-25732
Path Traversal in NiceGUI FileUpload.name Enables Remote Code Execution
Publication date: 2026-02-06
Last updated on: 2026-02-20
Assigner: GitHub, Inc.
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| zauberzeug | nicegui | to 3.7.0 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-22 | The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
The vulnerability exists in NiceGUI, a Python-based UI framework, in versions prior to 3.7.0. The FileUpload.name property exposes client-supplied filename metadata without sanitization. This allows attackers to use path traversal sequences like ../ in filenames to write files outside the intended upload directory.
If developers use the pattern UPLOAD_DIR / file.name without sanitizing the filename, malicious files can overwrite arbitrary files on the server. This can lead to remote code execution if critical application files are overwritten.
The vulnerability only affects applications that incorporate the unsanitized file.name into filesystem paths. Applications using fixed paths, generated filenames, or explicit sanitization are not affected. The issue is fixed in NiceGUI version 3.7.0.
How can this vulnerability impact me? :
This vulnerability can allow attackers to perform path traversal attacks by uploading files with specially crafted filenames containing ../ sequences.
As a result, attackers may write files outside the intended upload directory, potentially overwriting important application files.
This can lead to remote code execution, allowing attackers to execute arbitrary code on the server, compromising the application's integrity and security.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
I don't know
What immediate steps should I take to mitigate this vulnerability?
To mitigate this vulnerability, upgrade NiceGUI to version 3.7.0 or later where the issue is fixed.
Additionally, ensure that your application code does not incorporate client-supplied filenames directly into filesystem paths without proper sanitization.
Use fixed paths, generated filenames, or explicitly sanitize filenames to prevent path traversal attacks.