LiveActive security incident?Get immediate response
CVE Record

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

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.

MediumCVSS 6.1Not KEV-listedUpdated
Glexia's TakeAutomated analysismoderate

Security readout for executives and security teams

Plain-English summary

CVE-2026-21872 is a cross-site scripting issue in NiceGUI applications using ui.sub_pages and rendering user-provided links. An attacker could craft a link that runs script in a user’s browser after the user clicks it. This can expose limited data or alter page behavior, but it requires user interaction.

Executive priority

Treat as a timely patching item, not an emergency. Prioritize applications that are public-facing, handle sensitive user sessions, or allow user-generated links. Upgrade affected NiceGUI deployments to 3.5.0 or later.

Technical view

NiceGUI versions 2.22.0 through 3.4.1 have unsafe click event listener behavior in ui.sub_pages when combined with attacker-controlled link rendering. The issue is CWE-79 XSS with CVSS 6.1: network exploitable, low complexity, no privileges required, user interaction required, changed scope, low confidentiality and integrity impact.

Likely exposure

Exposure is most likely in Python applications built with NiceGUI versions >=2.22.0 and <3.5.0 that use ui.sub_pages and display links influenced by users or external input.

Exploitation context

The advisory states exploitation requires the user to actively click the rendered attacker-controlled link. The source bundle does not indicate known active exploitation, and the CVE is not listed as KEV.

Researcher notes

Evidence is limited to the CVE record, GitHub advisory, and v3.5.0 release reference. The vulnerability is specifically tied to ui.sub_pages plus attacker-controlled link rendering and click interaction. No public exploitation evidence is provided in the source bundle.

Mitigation direction

  • Upgrade NiceGUI to version 3.5.0 or later.
  • Review vendor advisory and release notes for environment-specific guidance.
  • Avoid rendering untrusted links in affected ui.sub_pages flows until patched.
  • Inventory NiceGUI applications and prioritize internet-facing or multi-user deployments.

Validation and detection

  • Identify NiceGUI versions in application dependencies.
  • Check whether the application uses ui.sub_pages.
  • Review pages that render user-provided or externally supplied links.
  • Confirm deployed builds run NiceGUI 3.5.0 or later.
  • Document whether compensating controls limit untrusted link rendering.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · medium confidence lookup

CWE-79: User-session and phishing behavior lookup

Client-side and session-facing weaknesses should be reviewed alongside initial-access and user-execution behaviors. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2026-21872 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
Medium
CVSS
6.1 (3.1)
Known Exploited
No
Published

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

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
6.1CVSS 3.1MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N2.82.7Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

6.1Medium
CVSS 3.1 vector shape for CVE-2026-21872Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

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

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
zauberzeugnicegui>= 2.22.0, < 3.5.0Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-79 · source CWE mapping

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')

Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.