CVE-2026-21873 Details
Description
NiceGUI is a Python-based UI framework. From versions 2.22.0 to 3.4.1, an unsafe implementation in the pushstate event listener used by ui.sub_pages allows an attacker to manipulate the fragment identifier of the URL, which they can do despite being cross-site, using an iframe. This issue has been patched in version 3.5.0.
A cross-site scripting (XSS) vulnerability has been identified in NiceGUI, a Python-based UI framework, affecting versions 2.22.0 prior to 3.4.1. The issue arises from an unsafe implementation in the pushstate event listener of the ui.sub_pages component, which allows attackers to manipulate the URL's fragment identifier. This manipulation can be executed cross-site using an iframe, leading to potential XSS attacks.
Users can update to NiceGUI version 3.5.0, which patches the vulnerability. Additionally, applications can implement a middleware to block iframe embedding by setting the 'X-Frame-Options' header to 'DENY'.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Jan 8, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/zauberzeug/nicegui/releases/tag/v3.5.0 | [email protected] | Release Notes |
| https://github.com/zauberzeug/nicegui/security/advisories/GHSA-mhpg-c27v-6mxr | [email protected] | ExploitVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| zauberzeug nicegui | >= 2.22.0, < 3.5.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 15, 2026 | Initial Analysis | [email protected] |
| Jan 8, 2026 | New CVE Received | [email protected] |