CVE-2026-21871

Source
https://cve.org/CVERecord?id=CVE-2026-21871
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-21871.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-21871
Aliases
Published
2026-01-08T09:49:55.136Z
Modified
2026-03-01T02:55:58.806333Z
Severity
  • 6.1 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N CVSS Calculator
Summary
NiceGUI is vulnerable to XSS via Unescaped URL in ui.navigate.history.push() / replace()
Details

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.

Database specific
{
    "cwe_ids": [
        "CWE-79"
    ],
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/21xxx/CVE-2026-21871.json",
    "cna_assigner": "GitHub_M"
}
References

Affected packages

Git / github.com/zauberzeug/nicegui

Affected ranges

Type
GIT
Repo
https://github.com/zauberzeug/nicegui
Events

Affected versions

v2.*
v2.13.0
v2.14.0
v2.14.1
v2.15.0
v2.16.0
v2.16.1
v2.17.0
v2.18.0
v2.19.0
v2.20.0
v2.21.0
v2.21.1
v2.22.0
v2.22.1
v2.22.2
v2.23.0
v2.23.1
v2.23.2
v2.23.3
v2.24.0
v2.24.1
v2.24.2
v3.*
v3.0.0
v3.0.0rc1
v3.0.1
v3.0.2
v3.0.3
v3.0.4
v3.1.0
v3.2.0
v3.3.0
v3.3.1
v3.4.0
v3.4.1

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-21871.json"