LiveActive security incident?Get immediate response
CVE Record

CVE-2026-21871: NiceGUI is vulnerable to XSS via Unescaped URL in ui.navigate.history.push() / replace()

NiceGUI is a Python-based UI framework. From versions 2.13.0 to 3.4.1, there is a XSS risk in NiceGUI when developers pass attacker-controlled strings into ui.navigate.history.push() or ui.navigate.history.replace(). These helpers are documented as History API wrappers for updating the browser URL without page reload. However, if the URL argument is embedded into generated JavaScript without proper escaping, a crafted payload can break out of the intended string context and execute arbitrary JavaScript in the victim’s browser. Applications that do not pass untrusted input into ui.navigate.history.push/replace are not affected. 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

NiceGUI applications may expose users to browser-based script execution if the app passes attacker-controlled URL strings into specific navigation history helpers. This is not a flaw in every NiceGUI app; it depends on how developers use ui.navigate.history.push() or replace(). The vendor patched the issue in NiceGUI 3.5.0.

Executive priority

Treat as a targeted remediation item for teams using NiceGUI. Prioritize internet-facing applications or workflows where URLs can be influenced by users. Upgrade to 3.5.0 and review affected helper usage, but avoid emergency escalation unless exposure is confirmed.

Technical view

CVE-2026-21871 is a CWE-79 XSS issue in NiceGUI versions 2.13.0 through 3.4.1. URL arguments passed to ui.navigate.history.push() or ui.navigate.history.replace() could be embedded into generated JavaScript without proper escaping, allowing crafted input to break string context and execute JavaScript in the victim browser.

Likely exposure

Exposure is limited to NiceGUI applications running affected versions and passing untrusted or attacker-influenced strings into ui.navigate.history.push() or ui.navigate.history.replace(). Applications that do not pass untrusted input to these helpers are stated as not affected.

Exploitation context

The CVSS vector indicates network reachability, low attack complexity, no privileges required, and required user interaction. The provided sources do not report active exploitation, and the CVE is not listed as KEV in the supplied bundle.

Researcher notes

The key exposure condition is developer-controlled data flow into the history helper URL argument. Sources describe the vulnerable range and fixed version, but do not provide exploit-in-the-wild evidence. Assessment should focus on framework version, helper usage, and whether external input reaches those calls.

Mitigation direction

  • Upgrade NiceGUI to version 3.5.0 or later.
  • Review use of ui.navigate.history.push() and replace() for untrusted input.
  • Avoid passing attacker-controlled strings into these helpers.
  • Check the GitHub advisory and release notes for vendor guidance.

Validation and detection

  • Inventory NiceGUI versions in deployed applications.
  • Identify applications using NiceGUI versions 2.13.0 through 3.4.1.
  • Search code for ui.navigate.history.push() and ui.navigate.history.replace().
  • Confirm whether arguments can be influenced by users or external input.
  • Verify upgraded deployments are running NiceGUI 3.5.0 or later.
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-21871 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-21871Attack 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.13.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.