Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | CVSS 5.9 with AC:H (high complexity) indicates the attack requires specific deployment conditions-Windows OS, use of file.name in path construction, and user-triggered file upload. EPSS data not provided, but the high complexity score suggests real-world exploitation is not trivial. The vulnerability is not confirmed as actively exploited (no CISA KEV status), and no public exploit code exists. However, the attack vector is network-based and requires no authentication (PR:N), lowering the barrier to exploitation once a vulnerable application is identified. The integrity impact (I:H) is significant: arbitrary file write can corrupt application integrity, modify configuration, or place executables in startup paths. Real-world risk depends heavily on application context-a web upload service on Windows with inadequate path validation represents serious risk, while Linux/macOS deployments are not vulnerable. This is a legitimate priority for Windows-based NiceGUI deployments but not a universal critical issue. |
| Exploit ScenarioDerived | An attacker uploads a file with filename 'data\..\..\system32\driver.exe' to a Windows-based NiceGUI application. The upload sanitization using PurePosixPath treats the backslashes as literal characters and returns the full string unchanged. The application then constructs a file path using Path('uploads') / file.name, which on Windows resolves the backslash separators, writing the file to an arbitrary system location. If the application has sufficient privileges and the target directory is writable, this could enable remote code execution by overwriting executables or configuration files. Attack complexity is high due to dependency on Windows filesystem semantics and application-specific path construction patterns, but no authentication is required. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Apr 08, 2026
Path traversal via backslash bypass in NiceGUI file upload sanitization allows arbitrary file write on Windows systems. The vulnerability exploits a cross-platform path handling inconsistency where PurePosixPath fails to strip backslash-based path traversal sequences, enabling attackers to write files outside the intended upload directory when applications construct paths using the sanitized filename. Windows deployments are exclusively affected; potential remote code execution is possible if executables or application files can be overwritten. No public exploit code identified at time of analysis, though the vulnerability is confirmed in NiceGUI versions prior to 3.10.0.
RemediationAI
Upgrade NiceGUI to version 3.10.0 or later, which corrects the path sanitization logic. The upstream fix (commit d38a702e3af2da5b0708f689be8d71413fc77056) replaces PurePosixPath-based sanitization with platform-aware path handling. For applications unable to upgrade immediately, implement additional validation: use pathlib.Path(uploads_dir).resolve() to obtain the canonical absolute path of the upload directory, then verify that any constructed file path (using Path.resolve()) remains within that directory before writing. Reference: https://github.com/zauberzeug/nicegui/security/advisories/GHSA-w8wv-vfpc-hw2w and https://github.com/zauberzeug/nicegui/releases/tag/v3.10.0.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
NiceGUI's filename sanitization in nicegui/elements/upload_files.py uses Python's pathlib.PurePosixPath to strip directory traversal sequences (CWE-22). PurePosixPath only recognizes forward slashes (/) as path separators per POSIX specification and treats backslashes as literal characters. On Windows, the subsequent file path construction using pathlib.Path interprets backslashes as directory separators, creating a semantic mismatch between the sanitization layer (POSIX model) and the filesystem layer (Windows model). This allows payloads like '..\..\secret\evil.txt' to bypass sanitization and resolve to arbitrary filesystem locations when processed by Windows Path operations. The vulnerability is specific to Windows because Unix-like systems (Linux, macOS) treat backslashes as valid filename characters, rendering the payload harmless.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
4DescriptionNVD
Summary
The upload filename sanitization introduced in GHSA-9ffm-fxg3-xrhh uses PurePosixPath(filename).name to strip path components. Since PurePosixPath only recognizes forward slashes (/) as path separators, an attacker can bypass this sanitization on Windows by using backslashes (\) in the upload filename.
Applications that construct file paths using file.name (a pattern demonstrated in NiceGUI's bundled examples) are vulnerable to arbitrary file write on Windows.
Details
The sanitization in nicegui/elements/upload_files.py uses:
filename = PurePosixPath(upload.filename or '').namePurePosixPath treats backslashes as literal characters, not path separators:
>>> PurePosixPath('..\\..\\secret\\evil.txt').name
'..\\..\\secret\\evil.txt'
# Not stripped!When this filename is used in a path operation on Windows (e.g., Path('uploads') / file.name), Windows Path interprets backslashes as directory separators, resolving the path outside the intended directory.
Impact
On Windows deployments of NiceGUI applications that use file.name in path construction:
- Arbitrary file write outside the intended upload directory
- Potential remote code execution through overwriting application files or placing executables in known locations
- Data integrity loss through overwriting existing files
Linux and macOS are not affected, as they treat backslashes as literal filename characters.
Blast Radius
ecosystem impact- 4 pypi packages depend on nicegui (3 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.10.0.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-20610
GHSA-w8wv-vfpc-hw2w
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB