CVE-2026-25516 Details
Description
NiceGUI is a Python-based UI framework. The ui.markdown() component uses the markdown2 library to convert markdown content to HTML, which is then rendered via innerHTML. By default, markdown2 allows raw HTML to pass through unchanged. This means that if an application renders user-controlled content through ui.markdown(), an attacker can inject malicious HTML containing JavaScript event handlers. Unlike other NiceGUI components that render HTML (ui.html(), ui.chat_message(), ui.interactive_image()), the ui.markdown() component does not provide or require a sanitize parameter, leaving applications vulnerable to XSS attacks. This vulnerability is fixed in 3.7.0.
A cross-site scripting (XSS) vulnerability exists in the NiceGUI framework's markdown component, specifically in versions through 3.6.1. The issue arises because the ui.markdown() function uses the markdown2 library to convert markdown into HTML, which is then rendered without proper sanitization. By default, markdown2 allows raw HTML to be passed through unchanged, enabling attackers to inject malicious HTML with JavaScript event handlers. This vulnerability is particularly concerning in applications that display user-generated content, such as chat messages or content management systems.
Users can upgrade to NiceGUI version 3.7.0 or later, where this vulnerability is fixed. For those unable to upgrade, it's recommended to manually sanitize content before using ui.markdown(), or to escape HTML entities to prevent interpretation of HTML.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 9, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/zauberzeug/nicegui/commit/f1f7533577875af7d23f161ed3627f73584cb561 | [email protected] | Patch |
| https://github.com/zauberzeug/nicegui/security/advisories/GHSA-v82v-c5x8-w282 | [email protected] | ExploitMitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| zauberzeug nicegui | < 3.7.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 20, 2026 | Initial Analysis | [email protected] |
| Feb 6, 2026 | New CVE Received | [email protected] |