Skip to content

← Actionable
Medium, CVSS 5.9amended

NiceGUI: Upload filename sanitization bypass via backslashes allows path traversal on Windows

CVE-2026-39844GHSA-w8wv-vfpc-hw2w

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (nicegui 3.10.0), redeploy, then verify what is actually installed.

This page has no inventory attached, so it cannot say whether you are affected. A vendor fix is not proof that your deployment is fixed.

Affected packages

  • PyPI nicegui

    Affected
    <= 3.9.0
    Fixed in
    3.10.0

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
5.9 · CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:N
EPSS
  • CVE-2026-39844: 0.37% estimated exploitation activity in the next 30 days; percentile 31.08 (FIRST EPSS, 2026-11-03). This is a model estimate, not proof of exploitation or customer exposure.
Source description

As published by the source; long descriptions are shortened.

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/uploadfiles.py uses: PurePosixPath treats backslashes as literal characters, not path separators: 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…

Dates and revisions
Published by the source
Last modified by the source
Source last checked
  1. Revision 2 · amended ·

    Amended from ghsa record GHSA-w8wv-vfpc-hw2w

  2. Revision 1 · created ·

    Published from osv record GHSA-w8wv-vfpc-hw2w

Agent brief

Preview the exact text before you copy it. Commands are read-only suggestions; review them before running anything.

# Patch Next advisory brief: CVE-2026-39844

Advisory: NiceGUI: Upload filename sanitization bypass via backslashes allows path traversal on Windows
IDs: CVE-2026-39844, GHSA-w8wv-vfpc-hw2w
Record: https://patchnext.com/advisories/cve-2026-39844 (revision 2, source checked 26 Oct 2026, 13:40 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 5.9)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: nicegui 3.10.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI nicegui: affected <= 3.9.0; fixed in 3.10.0

## Suggested inspection (read-only)
- `python -m pip show nicegui`: prints the installed version. Run with the environment that serves production active.

## Supported action
Upgrade each affected component to a fixed version on its release line. For a transitive dependency, upgrade the parent package or add an override or constraint, then regenerate the lockfile. Redeploy every environment that ran an affected version.

## Required regression checks
- Run the test suite and a production build.
- Exercise the features that depend on nicegui.
- Repeat the inspection and confirm that only fixed versions remain installed.

## Rollback considerations
- Keep the previous lockfile and deployment artifact. Rolling back reinstates the vulnerable version, so apply any documented mitigation while you fix forward.

## Unresolved questions
- Which deployments run an affected version?
- Exploitation status can change. Check again before lowering the priority.
- Mark the work resolved only after the fixed version is verified in production.

## Sources
- Verified: https://osv.dev/vulnerability/GHSA-w8wv-vfpc-hw2w (OSV record GHSA-w8wv-vfpc-hw2w lists affected ranges: PyPI nicegui >=0 <3.10.0 (fixed))
- Verified: https://github.com/advisories/GHSA-w8wv-vfpc-hw2w (GitHub-reviewed advisory GHSA-w8wv-vfpc-hw2w lists affected ranges: PyPI nicegui >=0 <=3.9.0)

Commands are suggestions: review each one before running it.

Loading voting…