CVE-2026-27156 Details
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.
A cross-site scripting (XSS) vulnerability has been identified in NiceGUI, a Python-based UI framework, prior to version 3.8.0. The issue arises in several NiceGUI APIs that execute methods on client-side elements, including 'Element.run_method()', 'AgGrid.run_grid_method()', and 'EChart.run_chart_method()'. These APIs used an 'eval()' fallback in the JavaScript 'runMethod()' function, allowing for the injection of arbitrary JavaScript that executes in the victim's browser. Additionally, 'Element.run_method()' and 'Element.get_computed_prop()' improperly handled method and property names, creating opportunities for quote injection and breaking out of the intended string context.
Users can upgrade to NiceGUI version 3.8.0 or later, where this vulnerability has been fixed. In version 3.8.0, the 'eval()' fallback has been removed from the 'runMethod()' function, and proper escaping for method and property names has been implemented using 'json.dumps()'.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Feb 26, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/zauberzeug/nicegui/commit/1861f59cc374ca0dc9d970b157ef3774720f8dbf | [email protected] | Patch |
| https://github.com/zauberzeug/nicegui/security/advisories/GHSA-78qv-3mpx-9cqq | [email protected] | MitigationVendor Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-79 | Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| zauberzeug nicegui | < 3.8.0 |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Feb 26, 2026 | Initial Analysis | [email protected] |
| Feb 24, 2026 | New CVE Received | [email protected] |