CVE-2026-21872: zauberzeug nicegui · Cross-site Scripting
Affects zauberzeug niceguiSource CVE Database V5
Not known to be exploited · CVSS 6.1 Medium : upgrade to 3.5.0 when convenient.
Data as of 26 Oct 2026, 10:12 UTC
- EPSS
- 0.2% chance of exploitation in 30 days – higher than 19% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 3.5.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:NExploitation evidence
Disclosed: evidence found.
CVE published 8 Jan 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade zauberzeug nicegui to 3.5.0.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| zauberzeugnicegui | Affected
| Fixed in
|
PyPIniceguipkg:pypi/niceguiOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
The primary mitigation is to upgrade all NiceGUI deployments to version 3.5.0 or later, where the vulnerability has been patched. Organizations should audit their applications to identify any use of ui.sub_pages and review how links and click event listeners are implemented, ensuring that all user-controlled input is properly sanitized and encoded before rendering. Implement Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts and reduce the impact of potential XSS attacks. Employ security-focused code reviews and automated scanning tools to detect unsafe input handling in UI components. Educate developers on secure coding practices related to event handling and input validation in web frameworks. Additionally, monitor web application logs for suspicious click patterns or script execution anomalies that could indicate attempted exploitation. For high-risk environments, consider implementing multi-factor authentication to mitigate session hijacking risks stemming from XSS.
Description
CVE-2026-21872 is a cross-site scripting (XSS) vulnerability in the Python-based UI framework NiceGUI versions 2.22.0 through 3.4.1. The flaw arises from unsafe handling of click event listeners in ui.sub_pages combined with attacker-controlled link rendering, allowing an attacker to execute arbitrary scripts when a user clicks a malicious link. This vulnerability requires user interaction but does not require authentication. It impacts confidentiality and integrity but not availability. The issue has been patched in version 3.