Nicegui
Monthly
Path traversal in NiceGUI before 3.7.0 allows remote attackers to write arbitrary files outside intended directories by exploiting unsanitized filename metadata in the FileUpload.name property, potentially leading to remote code execution when developers incorporate this value directly into file paths. Public exploit code exists for this vulnerability, affecting applications using common patterns like concatenating user-supplied filenames with upload directories. Developers are only protected if they use fixed paths, generate filenames server-side, or explicitly sanitize user input.
NiceGUI versions 2.22.0 through 3.4.1 contain a cross-site DOM-based XSS vulnerability in the pushstate event listener for ui.sub_pages that allows attackers to manipulate URL fragment identifiers via iframe injection. Public exploit code exists for this vulnerability, and affected users should upgrade to version 3.5.0 or later as no patch is currently available for vulnerable versions.
NiceGUI versions prior to 3.8.0 are vulnerable to stored cross-site scripting (XSS) through multiple APIs that improperly handle user-controlled method names, allowing attackers to inject arbitrary JavaScript that executes in victims' browsers. The vulnerability stems from unsafe use of eval() and string interpolation in Element.run_method(), AgGrid.run_grid_method(), EChart.run_chart_method(), and related functions. A patch is available in version 3.8.0 and later.
Cross-site scripting in NiceGUI's ui.markdown() component allows unauthenticated attackers to inject malicious HTML and JavaScript into applications that render user-controlled markdown content, as the component lacks built-in sanitization unlike other NiceGUI HTML rendering functions. Public exploit code exists for this vulnerability affecting NiceGUI versions before 3.7.0. Applications using ui.markdown() with untrusted input are vulnerable to session hijacking, credential theft, and other client-side attacks.
NiceGUI versions 2.10.0 through 3.4.1 fail to properly release Redis connections when users open and close browser tabs, allowing unauthenticated attackers to exhaust the Redis connection pool and degrade service functionality. An attacker can repeatedly trigger connection leaks without authentication, causing storage errors and degraded performance once connection limits are reached. Public exploit code exists for this vulnerability, which is patched in version 3.5.0.
NiceGUI versions 2.22.0 through 3.4.1 contain a stored cross-site scripting vulnerability in the click event listener of ui.sub_pages that executes attacker-controlled JavaScript when users click malicious links on the page. Public exploit code exists for this vulnerability, and affected users should upgrade to version 3.5.0 or later immediately. The vulnerability requires user interaction but can impact confidentiality and integrity with network-accessible exploitation.
Cross-site scripting (XSS) in NiceGUI versions 2.13.0 through 3.4.1 allows attackers to execute arbitrary JavaScript in users' browsers when applications pass untrusted input to the ui.navigate.history.push() or ui.navigate.history.replace() functions due to improper string escaping in generated JavaScript. Public exploit code exists for this vulnerability, and developers using affected versions should upgrade to 3.5.0 or later, or avoid passing user-controlled data to these navigation helpers. Applications that only use these functions with trusted, hardcoded URLs are unaffected.
Remote arbitrary file read in NiceGUI versions 3.3.1 and below affects applications that explicitly call App.add_media_files() to expose a directory; publicly available exploit code exists, though no CISA KEV listing was provided. An unauthenticated network attacker can use URL-encoded traversal sequences such as %2e%2e against the exposed media route to read files outside the configured directory, potentially exposing source code, configuration files, or /etc/hosts, subject to the server process's file permissions. EPSS is 1.12% (66th percentile), and the vendor has fixed the issue in 3.4.0.
Stored or reflected cross-site scripting in NiceGUI 3.3.1 and earlier lets an attacker execute arbitrary HTML and JavaScript in a victim's browser through the ui.interactive_image component and its layers when application code passes attacker-influenced SVG content into the component's content property. The flaw requires user interaction (the victim must render the affected view), is reachable without authentication per the CVSS vector (AV:N/PR:N/UI:R), and is only exploitable in applications that surface untrusted or user-generated content through this component; deployments rendering only trusted, static SVG are not affected. Exploitation is practical rather than theoretical - publicly available exploit code exists in the form of a working GitHub advisory PoC using an SVG <foreignObject> payload - but the EPSS score is low at roughly 0.25% (16th percentile), and there is no evidence of confirmed active exploitation. A vendor patch is available: NiceGUI 3.4.0.
Reflected cross-site scripting in NiceGUI 3.3.1 and earlier lets remote unauthenticated attackers inject arbitrary JavaScript through the ui.add_css, ui.add_scss, and ui.add_sass helpers whenever an application passes attacker-influenced input into them - for example a theme color taken from a URL query parameter, as in the vendor's own `?color=...` demonstration. Because the helpers interpolate that input directly into a `<style>` block or a client-side Sass compilation `<script>` block, a payload containing `</style>` or `</script>` breaks out of the intended context; the injected script then executes in the browser of a victim who opens a crafted link (UI:R, scope changed), enabling session/data theft or page defacement at low confidentiality and integrity impact. Publicly available exploit code exists, and EPSS is not a strong signal here, but the attack surface is conditional: only applications that feed untrusted data into these functions are exposed, and no CISA KEV active exploitation is recorded. The issue is fixed in NiceGUI 3.4.0.
Path traversal in NiceGUI before 3.7.0 allows remote attackers to write arbitrary files outside intended directories by exploiting unsanitized filename metadata in the FileUpload.name property, potentially leading to remote code execution when developers incorporate this value directly into file paths. Public exploit code exists for this vulnerability, affecting applications using common patterns like concatenating user-supplied filenames with upload directories. Developers are only protected if they use fixed paths, generate filenames server-side, or explicitly sanitize user input.
NiceGUI versions 2.22.0 through 3.4.1 contain a cross-site DOM-based XSS vulnerability in the pushstate event listener for ui.sub_pages that allows attackers to manipulate URL fragment identifiers via iframe injection. Public exploit code exists for this vulnerability, and affected users should upgrade to version 3.5.0 or later as no patch is currently available for vulnerable versions.
NiceGUI versions prior to 3.8.0 are vulnerable to stored cross-site scripting (XSS) through multiple APIs that improperly handle user-controlled method names, allowing attackers to inject arbitrary JavaScript that executes in victims' browsers. The vulnerability stems from unsafe use of eval() and string interpolation in Element.run_method(), AgGrid.run_grid_method(), EChart.run_chart_method(), and related functions. A patch is available in version 3.8.0 and later.
Cross-site scripting in NiceGUI's ui.markdown() component allows unauthenticated attackers to inject malicious HTML and JavaScript into applications that render user-controlled markdown content, as the component lacks built-in sanitization unlike other NiceGUI HTML rendering functions. Public exploit code exists for this vulnerability affecting NiceGUI versions before 3.7.0. Applications using ui.markdown() with untrusted input are vulnerable to session hijacking, credential theft, and other client-side attacks.
NiceGUI versions 2.10.0 through 3.4.1 fail to properly release Redis connections when users open and close browser tabs, allowing unauthenticated attackers to exhaust the Redis connection pool and degrade service functionality. An attacker can repeatedly trigger connection leaks without authentication, causing storage errors and degraded performance once connection limits are reached. Public exploit code exists for this vulnerability, which is patched in version 3.5.0.
NiceGUI versions 2.22.0 through 3.4.1 contain a stored cross-site scripting vulnerability in the click event listener of ui.sub_pages that executes attacker-controlled JavaScript when users click malicious links on the page. Public exploit code exists for this vulnerability, and affected users should upgrade to version 3.5.0 or later immediately. The vulnerability requires user interaction but can impact confidentiality and integrity with network-accessible exploitation.
Cross-site scripting (XSS) in NiceGUI versions 2.13.0 through 3.4.1 allows attackers to execute arbitrary JavaScript in users' browsers when applications pass untrusted input to the ui.navigate.history.push() or ui.navigate.history.replace() functions due to improper string escaping in generated JavaScript. Public exploit code exists for this vulnerability, and developers using affected versions should upgrade to 3.5.0 or later, or avoid passing user-controlled data to these navigation helpers. Applications that only use these functions with trusted, hardcoded URLs are unaffected.
Remote arbitrary file read in NiceGUI versions 3.3.1 and below affects applications that explicitly call App.add_media_files() to expose a directory; publicly available exploit code exists, though no CISA KEV listing was provided. An unauthenticated network attacker can use URL-encoded traversal sequences such as %2e%2e against the exposed media route to read files outside the configured directory, potentially exposing source code, configuration files, or /etc/hosts, subject to the server process's file permissions. EPSS is 1.12% (66th percentile), and the vendor has fixed the issue in 3.4.0.
Stored or reflected cross-site scripting in NiceGUI 3.3.1 and earlier lets an attacker execute arbitrary HTML and JavaScript in a victim's browser through the ui.interactive_image component and its layers when application code passes attacker-influenced SVG content into the component's content property. The flaw requires user interaction (the victim must render the affected view), is reachable without authentication per the CVSS vector (AV:N/PR:N/UI:R), and is only exploitable in applications that surface untrusted or user-generated content through this component; deployments rendering only trusted, static SVG are not affected. Exploitation is practical rather than theoretical - publicly available exploit code exists in the form of a working GitHub advisory PoC using an SVG <foreignObject> payload - but the EPSS score is low at roughly 0.25% (16th percentile), and there is no evidence of confirmed active exploitation. A vendor patch is available: NiceGUI 3.4.0.
Reflected cross-site scripting in NiceGUI 3.3.1 and earlier lets remote unauthenticated attackers inject arbitrary JavaScript through the ui.add_css, ui.add_scss, and ui.add_sass helpers whenever an application passes attacker-influenced input into them - for example a theme color taken from a URL query parameter, as in the vendor's own `?color=...` demonstration. Because the helpers interpolate that input directly into a `<style>` block or a client-side Sass compilation `<script>` block, a payload containing `</style>` or `</script>` breaks out of the intended context; the injected script then executes in the browser of a victim who opens a crafted link (UI:R, scope changed), enabling session/data theft or page defacement at low confidentiality and integrity impact. Publicly available exploit code exists, and EPSS is not a strong signal here, but the attack surface is conditional: only applications that feed untrusted data into these functions are exposed, and no CISA KEV active exploitation is recorded. The issue is fixed in NiceGUI 3.4.0.