Vulnerability · Published Feb 24, 2026 · Assigned by GitHub_M

CVE-2026-27156NiceGUI has XSS via Code Injection

Medium 6.1

In plain English

A medium-severity cross-site scripting in nicegui from zauberzeug. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 9% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.1Medium
Exploit odds (30 days)0.2%top 90.6% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

NiceGUI is a Python-based UI framework. Prior to version 3.8.0, several NiceGUI APIs that execute methods on client-side elements (`Element.run_method()`, `AgGrid.run_grid_method()`, `EChart.run_chart_method()`, and others) use an `eval()` fallback in the JavaScript-side `runMethod()` function. When user-controlled input is passed as the method name, an attacker can inject arbitrary JavaScript that executes in the victim's browser. Additionally, `Element.run_method()` and `Element.get_computed_prop()` used string interpolation instead of `json.dumps()` for the method/property name, allowing quote injection to break out of the intended string context. Version 3.8.0 contains a fix.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPInicegui3.8.0GHSA-78qv-3mpx-9cqq
PyPInicegui3.8.0PYSEC-2026-2232

Affected products (as reported)

VendorProductVersions
zauberzeug nicegui < 3.8.0

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

References