CVE-2025-53354: NiceGUI has a Reflected XSS
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
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 →