Skip to content

CVE-2026-21872 NiceGUI apps are vulnerable to XSS which uses `ui.sub_pages` and render arbitrary user-provided links

MediumCVSS 6.1 EPSS 0.27%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

Description

NiceGUI is a Python-based UI framework. From versions 2.22.0 to 3.4.1, an unsafe implementation in the click event listener used by ui.sub_pages, combined with attacker-controlled link rendering on the page, causes XSS when the user actively clicks on the link. This issue has been patched in version 3.5.0.

Upgrade path

2 packages: 2 fixed.

PackageAffectedFixed inStatus
pypi nicegui(PyPI) = 2.22.0; = 2.22.1; = 2.22.2; = 2.23.0 +20 more 3.5.0 Fixed
zauberzeug nicegui = >= 2.22.0, < 3.5.0; >= 2.22.0, < 3.5.0 3.5.0 Fixed

Affected products

ProductAffected versionsFixed in
pypi nicegui(PyPI) >= 2.22.0, < 3.5.0 3.5.0
pypi nicegui(PyPI) = 2.22.0 No fix listed
pypi nicegui(PyPI) = 2.22.1 No fix listed
pypi nicegui(PyPI) = 2.22.2 No fix listed
pypi nicegui(PyPI) = 2.23.0 No fix listed
pypi nicegui(PyPI) = 2.23.1 No fix listed
pypi nicegui(PyPI) = 2.23.2 No fix listed
pypi nicegui(PyPI) = 2.23.3 No fix listed
pypi nicegui(PyPI) = 2.24.0 No fix listed
pypi nicegui(PyPI) = 2.24.1 No fix listed
pypi nicegui(PyPI) = 2.24.2 No fix listed
pypi nicegui(PyPI) = 3.0.0 No fix listed
pypi nicegui(PyPI) = 3.0.0rc1 No fix listed
pypi nicegui(PyPI) = 3.0.1 No fix listed
pypi nicegui(PyPI) = 3.0.2 No fix listed
pypi nicegui(PyPI) = 3.0.3 No fix listed
pypi nicegui(PyPI) = 3.0.4 No fix listed
pypi nicegui(PyPI) = 3.1.0 No fix listed
pypi nicegui(PyPI) = 3.2.0 No fix listed
pypi nicegui(PyPI) = 3.3.0 No fix listed
pypi nicegui(PyPI) = 3.3.1 No fix listed
pypi nicegui(PyPI) = 3.4.0 No fix listed
pypi nicegui(PyPI) = 3.4.1 No fix listed
zauberzeug nicegui = >= 2.22.0, < 3.5.0 No fix listed
pypi nicegui(PyPI) >= 2.22.0, <= 3.4.1 No fix listed
Show 1 more
ProductAffected versionsFixed in
zauberzeug nicegui >= 2.22.0, < 3.5.0 3.5.0

References