Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. nicegui
  4. ›
  5. CVE-2025-53354

CVE-2025-53354: NiceGUI has a Reflected XSS

October 3, 2025

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.chat_message with HTML content.

Applications that directly reflect user input via ui.html() (or ui.chat_message 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.

References

  • github.com/advisories/GHSA-8c95-hpq2-w46f
  • github.com/zauberzeug/nicegui
  • github.com/zauberzeug/nicegui/commit/4673dc35c94a0c7339e2164378b0977332e60775
  • github.com/zauberzeug/nicegui/security/advisories/GHSA-8c95-hpq2-w46f
  • nvd.nist.gov/vuln/detail/CVE-2025-53354

Code Behaviors & Features

Detect and mitigate CVE-2025-53354 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 3.0.0

Fixed versions

  • 3.0.0

Solution

Upgrade to version 3.0.0 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/nicegui/CVE-2025-53354.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 08 Oct 2025 12:19:34 +0000.