Skip to main content

Python CVE-2026-39844

| EUVDEUVD-2026-20610 MEDIUM
Path Traversal (CWE-22)
2026-04-08 https://github.com/zauberzeug/nicegui GHSA-w8wv-vfpc-hw2w
5.9
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
5.9 MEDIUM
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
Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
High
Availability
None

Lifecycle Timeline

4
EUVD ID Assigned
Apr 08, 2026 - 15:16 euvd
EUVD-2026-20610
Analysis Generated
Apr 08, 2026 - 15:16 vuln.today
Patch released
Apr 08, 2026 - 15:16 nvd
Patch available
CVE Published
Apr 08, 2026 - 15:04 nvd
MEDIUM 5.9

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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:

python
filename = PurePosixPath(upload.filename or '').name

PurePosixPath treats backslashes as literal characters, not path separators:

python
>>> 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.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2026-55255 HIGH POC
8.4 Jun 19

Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing

Share

CVE-2026-39844 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy