PT-2026-2112 · Nicegui · Nicegui

·

CVE-2026-21873

·

Published

2026-01-08

·

Updated

2026-07-07

CVSS v3.1

7.2

High

VectorAV:N/AC:L/PR:N/UI:N/S:C/C:L/I:L/A:N
Name of the Vulnerable Software and Affected Versions NiceGUI versions 2.22.0 through 3.4.1
Description NiceGUI is a Python-based UI framework. An unsafe implementation in the pushstate event listener used by ui.sub pages allows an attacker to manipulate the fragment identifier of the URL, even from a different site, using an iframe. This manipulation is possible due to a flaw in how the framework handles URL fragment changes within sub-pages. The pushstate event listener is the component responsible for managing the browser's history state, and its improper implementation allows for cross-site manipulation.
Recommendations Upgrade to NiceGUI version 3.5.0 or later to resolve this issue.

Exploit

Fix

XSS

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-21873
GHSA-MHPG-C27V-6MXR
PYSEC-2026-1702

Affected Products

Nicegui