CVE-2026-21871: 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, 14:05 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, 3.4.2, 2.13.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 nicegui to 3.5.0; nicegui to 3.4.2 or 2.13.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
- Upgrade all NiceGUI instances to version 3.5.0 or later, where the vulnerability is patched.
- Conduct a thorough code audit to identify any usage of ui.navigate.history.push() and ui.navigate.history.replace() functions, verifying that no untrusted or attacker-controlled input is passed to these APIs.
- Implement strict input validation and sanitization on all user-supplied data that could influence URL navigation or JavaScript generation.
- Employ Content Security Policy (CSP) headers to restrict the execution of unauthorized scripts in browsers.
- Educate developers on secure coding practices related to client-side navigation and JavaScript injection risks.
- Monitor web application logs and user reports for suspicious activity indicative of XSS exploitation attempts.
- For applications where immediate upgrade is not feasible, consider applying runtime mitigations such as input filtering or disabling dynamic URL updates until patched.
- Incorporate automated security testing tools that detect XSS vulnerabilities during development and deployment cycles.
Description
CVE-2026-21871 is a cross-site scripting (XSS) vulnerability in the Python UI framework NiceGUI versions 2.13.0 to 3.4.1. The flaw arises when attacker-controlled input is passed into ui.navigate.history.push() or ui.navigate.