Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. nicegui
  4. ›
  5. CVE-2026-21871

CVE-2026-21871: NiceGUI is vulnerable to XSS via Unescaped URL in ui.navigate.history.push() / replace()

January 8, 2026

XSS risk exists 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.

References

  • github.com/advisories/GHSA-7grm-h62g-5m97
  • github.com/zauberzeug/nicegui
  • github.com/zauberzeug/nicegui/releases/tag/v3.5.0
  • github.com/zauberzeug/nicegui/security/advisories/GHSA-7grm-h62g-5m97
  • nvd.nist.gov/vuln/detail/CVE-2026-21871

Code Behaviors & Features

Detect and mitigate CVE-2026-21871 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions starting from 2.13.0 before 3.5.0

Fixed versions

  • 3.5.0

Solution

Upgrade to version 3.5.0 or above.

Impact 6.1 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Source file

pypi/nicegui/CVE-2026-21871.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 00:35:22 +0000.