---
schema_version: '1.0'
id: security-20260812-746471
title: CVE-2026-25516 — nicegui
url: https://osv.dev/vulnerability/PYSEC-2026-2231
url_hash: 746471e51a72a64ae8fe107c9709c5b675427d0988364d35272b6f7b44218d08
canonical_url: https://osv.dev/vulnerability/PYSEC-2026-2231
source: osv:pypa
category: security/library
category_raw: cve/library
region: null
tags:
- cve
- CVE-2026-25516
- PYSEC-2026-2231
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- nicegui
- PyPI
lang: en
published_at: '2026-02-06T22:16:11Z'
fetched_at: '2026-08-12T16:00:04.507972Z'
updated_at: '2026-08-22T14:45:11Z'
status: published
content_hash: 00503a22d420bc1b3d9418e8a89775897727e4ea2ac7a78f0198f7869cd98369
content_changed_at: '2026-08-22T13:15:21.594959Z'
license_note: full
summary: 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 use
summary_source: rss
summary_en: 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 use
summary_omitted_reason: null
redistribution: true
keywords_en:
- CVE
- CVE-2026-25516
- library vulnerability
- nicegui
- PyPI
- PYSEC-2026-2231
- severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- software security
entities_en:
- name: CVE
  type: data
- name: PyPI
  type: artifact
topics_en:
- library vulnerability
- software security
numeric_facts: []
entities:
- name: CVE
  type: data
- name: PyPI
  type: artifact
related_auto:
- name: Portal
  type: organization
  weight: 1.0
- name: Hugging Face
  type: organization
  weight: 1.0
computed_at: '2026-08-22T14:45:06Z'
---

# CVE-2026-25516 — nicegui

## TL;DR
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 use

## Key Points
- cve / CVE-2026-25516 / PYSEC-2026-2231 / severity:CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N / nicegui / PyPI

## Details
**Severity:** CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
**Advisory:** PYSEC-2026-2231 (CVE-2026-25516)

**Details:**
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.

**References:**
- https://github.com/zauberzeug/nicegui/commit/f1f7533577875af7d23f161ed3627f73584cb561
- https://github.com/zauberzeug/nicegui/security/advisories/GHSA-v82v-c5x8-w282

_Data: OSV.dev (upstream: pypa) — https://osv.dev/vulnerability/PYSEC-2026-2231_

## Source
元記事: [CVE-2026-25516 — nicegui](https://osv.dev/vulnerability/PYSEC-2026-2231) — published 2026-02-06T22:16:11Z
