{"id":"CVE-2026-27156","published":"2026-02-24T17:00:21Z","modified":"2026-02-26T21:33:40Z","title":"NiceGUI has XSS via Code Injection","vendor":"zauberzeug","product":"nicegui","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00201,"percentile":0.1016,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"}],"references":[{"url":"https://github.com/zauberzeug/nicegui/security/advisories/GHSA-78qv-3mpx-9cqq","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/zauberzeug/nicegui/commit/1861f59cc374ca0dc9d970b157ef3774720f8dbf","tags":["x_refsource_MISC"]}],"priority":{"score":6.3,"factors":[{"name":"EPSS percentile","points":2.03},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"zauberzeug","affectedVersions":[{"vendor":"zauberzeug","product":"nicegui","versions":["< 3.8.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2026-02-26T21:06:43.447905Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"nicegui","vulnerableRanges":["<3.8.0"],"patched":["3.8.0"],"from":["GHSA-78qv-3mpx-9cqq","PYSEC-2026-2232"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-8544","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-21874","published":"2026-01-08","fixed":"3.5.0","kev":false},{"cve":"CVE-2026-25516","published":"2026-02-06","fixed":"3.7.0","kev":false},{"cve":"CVE-2026-25732","published":"2026-02-06","fixed":"3.7.0","kev":false,"link":{"from":"CVE-2026-25732","to":"CVE-2026-27156","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:nicegui","fromFixed":"3.7.0","toFixed":"3.8.0","daysApart":18}]}},{"cve":"CVE-2026-27156","published":"2026-02-24","fixed":"3.8.0","kev":false},{"cve":"CVE-2026-33332","published":"2026-03-24","fixed":"3.9.0","kev":false,"link":{"from":"CVE-2026-27156","to":"CVE-2026-33332","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:nicegui","fromFixed":"3.8.0","toFixed":"3.9.0","daysApart":28}]}},{"cve":"CVE-2026-39844","published":"2026-04-08","fixed":"3.10.0","kev":false},{"cve":"CVE-2026-45553","published":"2026-06-02","fixed":"3.12.0","kev":false}],"package":"PyPI:nicegui"}}