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

CVE-2026-25516: NiceGUI's XSS vulnerability in ui.markdown() allows arbitrary JavaScript execution through unsanitized HTML content

February 5, 2026

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.

References

  • github.com/advisories/GHSA-v82v-c5x8-w282
  • github.com/zauberzeug/nicegui
  • github.com/zauberzeug/nicegui/commit/f1f7533577875af7d23f161ed3627f73584cb561
  • github.com/zauberzeug/nicegui/security/advisories/GHSA-v82v-c5x8-w282
  • nvd.nist.gov/vuln/detail/CVE-2026-25516

Code Behaviors & Features

Detect and mitigate CVE-2026-25516 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.7.0

Fixed versions

  • 3.7.0

Solution

Upgrade to version 3.7.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-2026-25516.yml

Spotted a mistake? Edit the file on GitLab.

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

Page generated Sat, 07 Feb 2026 00:18:04 +0000.