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

- Severity: Medium 6.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.28%, higher than 21% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-02-05T17:41:17.000Z
- Modified: 2026-07-13T07:26:12.382Z
- Also known as: GHSA-v82v-c5x8-w282, PYSEC-2026-2231
- Weaknesses: CWE-79
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- zauberzeug nicegui: < 3.7.0; before 3.7.0
- nicegui (PyPI): before 3.7.0

## Every score

- GitHub_M: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- GitHub: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`
- PyPA Advisory Database: CVSS:3.1 6.1 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N`

## References

- <https://github.com/zauberzeug/nicegui/security/advisories/GHSA-v82v-c5x8-w282> (exploit, evidence, mitigation, vendor-advisory, web)
- <https://github.com/zauberzeug/nicegui/commit/f1f7533577875af7d23f161ed3627f73584cb561> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-25516> (advisory)
- <https://github.com/zauberzeug/nicegui> (package)

## Sources

- CVE List: [CVE-2026-25516](https://www.cve.org/CVERecord?id=CVE-2026-25516), CVE Terms of Use, modified 2026-02-09
- GitHub Advisory Database: [GHSA-v82v-c5x8-w282](https://github.com/advisories/GHSA-v82v-c5x8-w282), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-25516](https://nvd.nist.gov/vuln/detail/CVE-2026-25516), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-2231](https://osv.dev/vulnerability/PYSEC-2026-2231), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-25516 · Whole record: https://cve.day/CVE-2026-25516.json · Rebuilt by cve.day 2026-11-25T22:59:13.583Z
