Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Primary rating from GitHub Advisory · only source for this CVE.
CVSS VectorGitHub Advisory
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
Lifecycle Timeline
4Blast Radius
ecosystem impact- 4 pypi packages depend on nicegui (3 direct, 1 indirect)
Ecosystem-wide dependent count for version 3.10.0.
DescriptionGitHub Advisory
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.
AnalysisAI
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.
Technical ContextAI
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.
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.
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.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
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
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-20610
GHSA-w8wv-vfpc-hw2w