CVE-2026-21871 NiceGUI is vulnerable to XSS via Unescaped URL in ui.navigate.history.push() / replace()
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: partial
Description
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.
Upgrade path
2 packages: 2 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| pypi nicegui(PyPI) | = 2.13.0; = 2.14.0; = 2.14.1; = 2.15.0 +32 more | 3.5.0 | Fixed |
| zauberzeug nicegui | = >= 2.13.0, < 3.5.0; >= 2.13.0, < 3.5.0 | 3.5.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi nicegui(PyPI) | >= 2.13.0, < 3.5.0 | 3.5.0 |
| pypi nicegui(PyPI) | = 2.13.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.14.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.14.1 | No fix listed |
| pypi nicegui(PyPI) | = 2.15.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.16.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.16.1 | No fix listed |
| pypi nicegui(PyPI) | = 2.17.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.18.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.19.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.20.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.21.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.21.1 | No fix listed |
| pypi nicegui(PyPI) | = 2.22.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.22.1 | No fix listed |
| pypi nicegui(PyPI) | = 2.22.2 | No fix listed |
| pypi nicegui(PyPI) | = 2.23.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.23.1 | No fix listed |
| pypi nicegui(PyPI) | = 2.23.2 | No fix listed |
| pypi nicegui(PyPI) | = 2.23.3 | No fix listed |
| pypi nicegui(PyPI) | = 2.24.0 | No fix listed |
| pypi nicegui(PyPI) | = 2.24.1 | No fix listed |
| pypi nicegui(PyPI) | = 2.24.2 | No fix listed |
| pypi nicegui(PyPI) | = 3.0.0 | No fix listed |
| pypi nicegui(PyPI) | = 3.0.0rc1 | No fix listed |
Show 13 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi nicegui(PyPI) | = 3.0.1 | No fix listed |
| pypi nicegui(PyPI) | = 3.0.2 | No fix listed |
| pypi nicegui(PyPI) | = 3.0.3 | No fix listed |
| pypi nicegui(PyPI) | = 3.0.4 | No fix listed |
| pypi nicegui(PyPI) | = 3.1.0 | No fix listed |
| pypi nicegui(PyPI) | = 3.2.0 | No fix listed |
| pypi nicegui(PyPI) | = 3.3.0 | No fix listed |
| pypi nicegui(PyPI) | = 3.3.1 | No fix listed |
| pypi nicegui(PyPI) | = 3.4.0 | No fix listed |
| pypi nicegui(PyPI) | = 3.4.1 | No fix listed |
| zauberzeug nicegui | = >= 2.13.0, < 3.5.0 | No fix listed |
| pypi nicegui(PyPI) | >= 2.13.0, <= 3.4.1 | No fix listed |
| zauberzeug nicegui | >= 2.13.0, < 3.5.0 | 3.5.0 |
References
- https://github.com/zauberzeug/nicegui/security/advisories/GHSA-7grm-h62g-5m97 exploit vendor-advisory
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com product
- https://github.com/zauberzeug/nicegui/releases/tag/v3.5.0 release-notes
- pypi.org product
- github.com vendor-advisory