Skip to main content

Python CVE-2026-39844

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

CVSS VectorNVD

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.

DescriptionNVD

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

Sign in for full analysis, threat intelligence, and remediation guidance.

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