{"id":"CVE-2026-25516","published":"2026-02-06T21:12:19Z","modified":"2026-02-09T15:27:15Z","title":"NiceGUI's XSS vulnerability in ui.markdown() allows arbitrary JavaScript execution through unsanitized HTML content","vendor":"zauberzeug","product":"nicegui","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00276,"percentile":0.20515,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/zauberzeug/nicegui/security/advisories/GHSA-v82v-c5x8-w282","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/zauberzeug/nicegui/commit/f1f7533577875af7d23f161ed3627f73584cb561","tags":["x_refsource_MISC"]}],"priority":{"score":8.4,"factors":[{"name":"EPSS percentile","points":4.1},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"zauberzeug","affectedVersions":[{"vendor":"zauberzeug","product":"nicegui","versions":["< 3.7.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-02-09T15:19:21.019601Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"nicegui","vulnerableRanges":["<3.7.0"],"patched":["3.7.0"],"from":["GHSA-v82v-c5x8-w282","PYSEC-2026-2231"],"provenance":"source"}],"summary":{"text":"NiceGUI's ui.markdown() component, which converts markdown to HTML via the markdown2 library and renders it with innerHTML, passes raw HTML through unsanitized, so any application that renders user-controlled content through it is exposed to cross-site scripting. An unauthenticated remote attacker over the network can exploit this by supplying crafted content that a victim then views, since exploitation requires the victim to interact with the page, and the injected JavaScript runs in the victim's browser with the scope of the application's origin.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:10:45Z"},"euvd":{"id":"EUVD-2026-5566","exploited":false,"provenance":"source"}}