Skip to main content
CVE-2026-21873VulnerabilityPublished

CVE-2026-21873: zauberzeug nicegui · Cross-site Scripting

Affects zauberzeug niceguiSource CVE Database V5

0

Not known to be exploited · CVSS 7.2 High : upgrade to 3.5.0 soon.

Data as of 26 Oct 2026, 07:57 UTC

CVSS 3.1 base score
7.2High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 17% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 3.5.0
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 8 Jan 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq 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 2026-10-26.

What to do

Upgrade zauberzeug nicegui to 3.5.0.

Affected software

ProductAffectedFixed in
zauberzeugniceguiAffected
  • >=2.22.0 <3.5.0
Fixed in
  • 3.5.0
PyPIniceguipkg:pypi/niceguiOther threatsAffected
  • >=2.22.0 <=3.4.1
Fixed in–

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

1. Upgrade all NiceGUI deployments to version 3.5.0 or later immediately to apply the official patch addressing the XSS vulnerability. 2. Implement strict Content Security Policies (CSP) that restrict script sources and disallow inline scripts to reduce the risk of script injection exploitation. 3. Review and sanitize any user-controllable inputs that may influence URL fragments or client-side routing logic beyond the framework's default handling. 4. Avoid embedding NiceGUI-based applications within iframes on untrusted domains or implement frame-ancestors directives to control framing. 5. Conduct security testing, including penetration tests and code reviews, focusing on client-side input handling and URL manipulation. 6. Monitor web application logs and user reports for suspicious activity related to URL fragment manipulation or unexpected script execution. 7. Educate developers about secure handling of client-side routing and fragment identifiers to prevent similar issues in future development.

Description

CVE-2026-21873 is a high-severity cross-site scripting (XSS) vulnerability in the Python UI framework NiceGUI versions 2.22.0 through 3.4.1. The flaw arises from unsafe handling of the URL fragment identifier in the pushstate event listener used by ui.sub_pages, allowing attackers to manipulate the URL fragment via cross-site iframes without requiring user interaction or privileges. This can lead to partial compromise of confidentiality and integrity by injecting malicious scripts. The vulnerability has been patched in version 3.5.

References

Community reviews

Loading reviews…