CVE-2026-21871 json
NiceGUI is vulnerable to XSS via Unescaped URL in ui.navigate.history.push() / replace()
published 2026-01-08 10 mo ago modified 2026-07-07 4 mo ago also EUVD-2026-1478 , GHSA-7grm-h62g-5m97 , PYSEC-2026-1698
- cvss
- 6.1
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.3%
- EPSS 0.3% chance of exploitation in 30 days, percentile 19%
- public exploits
- 0
- none known
Summary
NiceGUI is a Python-based UI framework. From versions 2.13.0 to 3.4.1, there is a XSS risk in NiceGUI when developers pass attacker-controlled strings into ui.navigate.history.push() or ui.navigate.history.replace(). These helpers are documented as History API wrappers for updating the browser URL without page reload. However, if the URL argument is embedded into generated JavaScript without proper escaping, a crafted payload can break out of the intended string context and execute arbitrary JavaScript in the victim’s browser. Applications that do not pass untrusted input into ui.navigate.history.push/replace are not affected. This issue has been patched in version 3.5.0.
Patch / fix
- pypi nicegui 3.5.0
- zauberzeug nicegui 3.5.0
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 10 mo ago
Exploit prediction
0.27% chance of exploitation in the next 30 days, higher than 19% of all scored CVEs (FIRST EPSS, 2026-11-08).
Exploits and checks
- github.com https://github.com/zauberzeug/nicegui/security/advisories/GHSA-7grm-h62g-5m97 referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| GitHub | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| OSV | 3.1 | 6.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| pypi | nicegui | >=2.13.0, <3.5.0 |
3.5.0 |
Affected products
- zauberzeug nicegui
Classification
- Weakness
-
- CWE-79 Improper Neutralization of Input During Web Page Generation
References
-
github.com
/zauberzeug/nicegui/security/advisories/GHSA-7grm-h62g-5m97
web, exploit, vendor-advisory
-
github.com
/zauberzeug/nicegui/releases/tag/v3.5.0
web, release-notes
-
nvd.nist.gov
/vuln/detail/CVE-2026-21871
advisory
-
github.com
/zauberzeug/nicegui
package
-
pypi.org
/project/nicegui
package
-
github.com
/advisories/GHSA-7grm-h62g-5m97
advisory
Sources
- CVE List CVE-2026-21871
- GitHub Advisory GHSA-7grm-h62g-5m97
- NVD CVE-2026-21871
- OSV PYSEC-2026-1698
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.
CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.