Skip to content

← Actionable
Medium, CVSS 6.1amended

NiceGUI has a Reflected XSS

CVE-2025-53354GHSA-8c95-hpq2-w46f

What to do

Vendor fix available. Upgrade each affected package to the fixed version on its release line (nicegui 3.0.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.0.0
    Fixed in
    3.0.0

Sources

Severity and exploitation
Exploitation
No confirmed exploitation recorded. Patch Next marks exploitation only from CISA KEV.
CVSS
6.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
EPSS
  • CVE-2025-53354: 0.20% estimated exploitation activity in the next 30 days; percentile 10.39 (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 A Cross-Site Scripting (XSS) risk exists in NiceGUI when developers render unescaped user input into the DOM using ui.html(). Before version 3.0, NiceGUI does not enforce HTML or JavaScript sanitization, so applications that directly combine components like ui.input() with ui.html() without escaping may allow attackers to execute arbitrary JavaScript in the user’s browser. Same holds for ui.chatmessage with HTML content. Applications that directly reflect user input via ui.html() (or ui.chatmessage in HTML mode) are affected. This may lead to client-side code execution (e.g., session hijacking or phishing). Applications that do not pass untrusted input into ui.html() are not affected. Details NiceGUI allows developers to bind user input directly into the DOM using ui.html() or ui.chatmessage(). However, the library does not enforce any HTML or JavaScript sanitization, which potentially creates a dangerous attack surface for developers unaware of this behavior. The vulnerable…

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

    Amended from ghsa record GHSA-8c95-hpq2-w46f

  2. Revision 1 · created ·

    Published from osv record GHSA-8c95-hpq2-w46f

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-2025-53354

Advisory: NiceGUI has a Reflected XSS
IDs: CVE-2025-53354, GHSA-8c95-hpq2-w46f
Record: https://patchnext.com/advisories/cve-2025-53354 (revision 2, source checked 26 Oct 2026, 13:35 UTC)
Inventory: none attached. This brief comes from a public page and does not say whether any deployment is affected.
Severity: Medium (CVSS 6.1)
Exploitation: no confirmed exploitation recorded. Patch Next confirms exploitation only from CISA KEV.
Vendor response: Vendor fix available; fixed versions by package: nicegui 3.0.0. A vendor fix does not mean a deployment is fixed.

## Affected components
- PyPI nicegui: affected < 3.0.0; fixed in 3.0.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-8c95-hpq2-w46f (OSV record GHSA-8c95-hpq2-w46f lists affected ranges: PyPI nicegui >=0 <3.0.0 (fixed))
- Verified: https://github.com/advisories/GHSA-8c95-hpq2-w46f (GitHub-reviewed advisory GHSA-8c95-hpq2-w46f lists affected ranges: PyPI nicegui >=0 <3.0.0)

Commands are suggestions: review each one before running it.

Loading voting…