{"id":"CVE-2026-21872","summary":"NiceGUI apps are vulnerable to XSS which uses `ui.sub_pages` and render arbitrary user-provided links","details":"NiceGUI is a Python-based UI framework. From versions 2.22.0 to 3.4.1, an unsafe implementation in the click event listener used by ui.sub_pages, combined with attacker-controlled link rendering on the page, causes XSS when the user actively clicks on the link. This issue has been patched in version 3.5.0.","aliases":["GHSA-m7j5-rq9j-6jj9","PYSEC-2026-1701"],"modified":"2026-08-12T03:51:46.821787341Z","published":"2026-01-08T09:50:02.801Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/21xxx/CVE-2026-21872.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-79"]},"references":[{"type":"WEB","url":"https://github.com/zauberzeug/nicegui/releases/tag/v3.5.0"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/21xxx/CVE-2026-21872.json"},{"type":"ADVISORY","url":"https://github.com/zauberzeug/nicegui/security/advisories/GHSA-m7j5-rq9j-6jj9"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-21872"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/zauberzeug/nicegui","events":[{"introduced":"56f65c8dd214f2a0c6f9ca7754dd55c01fbd79d1"},{"fixed":"ae20f775a683fdf8643cb8cbb35d14279b866af6"}],"database_specific":{"source":["AFFECTED_FIELD","CPE_RANGE","REFERENCES"],"cpe":"cpe:2.3:a:zauberzeug:nicegui:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"2.22.0"},{"fixed":"3.5.0"}]}}],"versions":["v3.4.1","v3.4.0","v3.3.1","v3.3.0","v3.2.0","v3.1.0","v3.0.4","v3.0.3","v3.0.2","v3.0.1","v3.0.0","v2.24.2","v2.24.1","v2.24.0","v2.23.3","v2.23.2","v2.23.1","v2.23.0","v2.22.1","v2.22.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-21872.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"}]}