Open actionable advisories and recorded vendor fixes. This public package view has no inventory attached and cannot establish whether your deployment is affected. A vendor fix never resolves your finding; verify your installed version and the source guidance.
Open advisories
17 actionable advisories, newest first. Withdrawn advisories and news are excluded. Coverage is partial.
Two FastAPI routes that serve per-component static assets in NiceGUI accept a sub-path parameter that may resolve to a directory rather than a file. Requests that resolve to a directory raise an unhandled RuntimeError inside Starlette's FileResponse, which Uvicorn writes to the server log as a full traceback. Because the routes are reachable without authentication, a remote attacker can amplify log volume and consume disk and log-pipeline capacity on any publicly reachable NiceGUI server. There is no impact to confidentiality or integrity. Details The affected routes are the per-component resource route (added in v1.4.6) and the ESM module route (added in v3.0.0). Both join a user-supplied path segment with a registered base directory and pass the result to FileResponse. The existing existence check uses pathlib.Path.exists(), which returns True for directories — so a request whose sub-path resolves to a directory passes the guard and triggers an unhandled exception inside…
Recommended action: Upgrade to 3.12.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
ui.restructuredtext() renders reStructuredText server-side with Docutils without disabling file insertion directives. When a NiceGUI application passes attacker-controlled content to ui.restructuredtext(), an attacker can use standard Docutils directives (include, csv-table with :file:, raw with :file:) to read local files readable by the NiceGUI server process. Applications that only pass trusted static strings to ui.restructuredtext() are not affected. Details The affected component is the reStructuredText renderer: - File: nicegui/elements/restructuredtext.py - Function: preparecontent() preparecontent() renders user-supplied reStructuredText through Docutils: The Docutils call only sets syntaxhighlight. It does not disable file insertion or raw directives, so Docutils processes directives that read local files and embed their contents into the generated HTML before it is returned to the browser. Frontend sanitization cannot prevent this because the file has already been…
Recommended action: Upgrade to 3.12.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
The upload filename sanitization introduced in GHSA-9ffm-fxg3-xrhh uses PurePosixPath(filename).name to strip path components. Since PurePosixPath only recognizes forward slashes (/) as path separators, an attacker can bypass this sanitization on Windows by using backslashes (\) in the upload filename. Applications that construct file paths using file.name (a pattern demonstrated in NiceGUI's bundled examples) are vulnerable to arbitrary file write on Windows. Details The sanitization in nicegui/elements/uploadfiles.py uses: PurePosixPath treats backslashes as literal characters, not path separators: When this filename is used in a path operation on Windows (e.g., Path('uploads') / file.name), Windows Path interprets backslashes as directory separators, resolving the path outside the intended directory. Impact On Windows deployments of NiceGUI applications that use file.name in path construction: - Arbitrary file write outside the intended upload directory - Potential remote…
Recommended action: Upgrade to 3.10.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
NiceGUI's app.addmediafile() and app.addmediafiles() media routes accept a user-controlled query parameter that influences how files are read during streaming. The parameter is passed to the range-response implementation without validation, allowing an attacker to bypass chunked streaming and force the server to load entire files into memory at once. With large media files and concurrent requests, this can lead to excessive memory consumption, degraded performance, or denial of service. Impact Affected applications: NiceGUI applications that serve media content via app.addmediafile() or app.addmediafiles(), particularly those serving large files (video, audio). What an attacker can do: - Force the server to load entire files into memory instead of streaming them in chunks - Amplify memory usage with concurrent requests to large media files - Cause performance degradation, memory pressure, and potential OOM conditions Attack difficulty: Low - requires only a crafted query…
Recommended action: Upgrade to 3.9.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Several NiceGUI APIs that execute methods on client-side elements (Element.runmethod(), AgGrid.rungridmethod(), EChart.runchartmethod(), 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.runmethod() and Element.getcomputedprop() used string interpolation instead of json.dumps() for the method/property name, allowing quote injection to break out of the intended string context. Attack Vector An attacker crafts a malicious URL with a payload as a query parameter. If the application passes this parameter as a method name to any of the affected APIs, the payload is sent to the client via WebSocket and executed via eval(). Example: /?method=alert(document.cookie) combined with application code like: Impact - Cookie/token theft - DOM manipulation (phishing, fake login forms) - Actions performed…
Recommended action: Upgrade to 3.8.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
NiceGUI's FileUpload.name property exposes client-supplied filename metadata without sanitization, enabling path traversal when developers use the pattern UPLOADDIR / file.name. Malicious filenames containing ../ sequences allow attackers to write files outside intended directories, with potential for remote code execution through application file overwrites in vulnerable deployment patterns. This design creates a prevalent security footgun affecting applications following common community patterns. Note: Exploitation requires application code incorporating file.name into filesystem paths without sanitization. Applications using fixed paths, generated filenames, or explicit sanitization are not affected. Details Vulnerable Component: nicegui/elements/uploadfiles.py (uploadfiles.py#L79-L82 and uploadfiles.py#L110-L115) Affected Methods: SmallFileUpload.save()and LargeFileUpload.save() Root Cause: The save() method performs no validation on the provided path parameter. It…
Recommended action: Upgrade to 3.7.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
The ui.markdown() component uses the markdown2 library to convert markdown content to HTML, which is then rendered via innerHTML. By default, markdown2 allows raw HTML to pass through unchanged. This means that if an application renders user-controlled content through ui.markdown(), an attacker can inject malicious HTML containing JavaScript event handlers. Unlike other NiceGUI components that render HTML (ui.html(), ui.chatmessage(), ui.interactiveimage()), the ui.markdown() component does not provide or require a sanitize parameter, leaving applications vulnerable to XSS attacks. Proof of Concept When this page loads, the JavaScript in the onerror handler executes, potentially allowing an attacker to: - Steal session cookies or authentication tokens - Perform actions on behalf of the user - Redirect users to malicious sites - Modify page content Impact Applications that render user-provided content through ui.markdown() are vulnerable to stored or reflected XSS attacks.…
Recommended action: Upgrade to 3.7.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
An unauthenticated attacker can exhaust Redis connections by repeatedly opening and closing browser tabs on any NiceGUI application using Redis-backed storage. Connections are never released, leading to service degradation when Redis hits its connection limit. NiceGUI continues accepting new connections - errors are logged but the app stays up with broken storage functionality. Details When a client disconnects, tabid is cleared at https://github.com/zauberzeug/nicegui/blob/main/nicegui/client.py#L307 before delete() is called at https://github.com/zauberzeug/nicegui/blob/main/nicegui/client.py#L319. By then tabid is None, so there's no way to find the RedisPersistentDict and call https://github.com/zauberzeug/nicegui/blob/main/nicegui/persistence/redispersistentdict.py#L92. Each tab creates a RedisPersistentDict with a Redis client connection and a pubsub subscription. These are never closed, accumulating until Redis maxclients is reached. PoC Test server…
Recommended action: Upgrade to 3.5.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
An unsafe implementation in the pushstate event listener used by ui.subpages allows an attacker to manipulate the fragment identifier of the URL, which they can do despite being cross-site, using an iframe. Details The problem is traced as follows: 1. On pushstate, handleStateEvent is executed. https://github.com/zauberzeug/nicegui/blob/59fa9424c470f1b12c5d368985fa36e21fda706b/nicegui/elements/subpages.js#L38-L39 2. handleStateEvent emits subpagesopen event. https://github.com/zauberzeug/nicegui/blob/59fa9424c470f1b12c5d368985fa36e21fda706b/nicegui/elements/subpages.js#L22-L25 3. SubPagesRouter (used by ui.subpages), lisnening on subpagesopen, handleopen runs. https://github.com/zauberzeug/nicegui/blob/59fa9424c470f1b12c5d368985fa36e21fda706b/nicegui/subpagesrouter.py#L18-L22 4. handleopen finds any SubPages and runs show() on them https://github.com/zauberzeug/nicegui/blob/59fa9424c470f1b12c5d368985fa36e21fda706b/nicegui/subpagesrouter.py#L63-L71 5. If the if-logic is…
Recommended action: Upgrade to 3.5.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
An unsafe implementation in the click event listener used by ui.subpages, combined with attacker-controlled link rendering on the page, causes an XSS when the user actively clicks on the link. Details 1. On click, eventually subpagesnavigate event is emitted. https://github.com/zauberzeug/nicegui/blob/59fa9424c470f1b12c5d368985fa36e21fda706b/nicegui/elements/subpages.js#L41-L63 2. SubPagesRouter (used by ui.subpages), lisnening on subpagesnavigate, handlenavigate runs. https://github.com/zauberzeug/nicegui/blob/59fa9424c470f1b12c5d368985fa36e21fda706b/nicegui/subpagesrouter.py#L18-L22 3. handlenavigate runs runjavascript with f-string substituting self.currentpath which is simply surrounded by double-quotes. The string context can be broken out easily. https://github.com/zauberzeug/nicegui/blob/59fa9424c470f1b12c5d368985fa36e21fda706b/nicegui/subpagesrouter.py#L73-L88 PoC The minimal PoC boils down to this: However, it is more likely that the attack takes place with…
Recommended action: Upgrade to 3.5.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
XSS risk exists 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. Details NiceGUI provides ui.navigate.history.push(url) and ui.navigate.history.replace(url) to update the URL using the browser History API. If an application forwards user-controlled data (e.g., URL path segments, query parameters like next=..., form values, etc.) into these methods, an attacker can inject characters such as quotes and statement terminators to escape the JavaScript string context and execute arbitrary code. A…
Recommended action: Upgrade to 3.5.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
A directory traversal vulnerability in NiceGUI's App.addmediafiles() allows a remote attacker to read arbitrary files on the server filesystem. Details Hello, I am Seungbin Yang, a university student studying cybersecurity. While reviewing the source code of the repository, I discovered a potential vulnerability and successfully verified it with a PoC. The App.addmediafiles(urlpath, localdirectory) method allows users to serve media files. However, the implementation lacks proper path validation. Root Cause: 1. The {filename:path} parameter accepts full paths, including traversal sequences like ../. 2. The code simply joins localdirectory and filename without checking if the result is still inside the localdirectory. 3. There is no path sanitization or boundary check. Consequence: An attacker can use .. to access files outside the intended directory. If the application has permission, sensitive files (e.g., /etc/hosts, source code, config files) can be exposed. POC 1. Create…
Recommended action: Upgrade to 3.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
A Cross-Site Scripting (XSS) vulnerability exists in the ui.interactiveimage component of NiceGUI (v3.3.1 and earlier). The component renders SVG content using Vue's v-html directive without any sanitization. This allows attackers to inject malicious HTML or JavaScript via the SVG <foreignObject tag. Details The vulnerability is located in nicegui/elements/interactiveimage.js. The component uses the following code to render content: Vue's v-html directive renders raw HTML strings into the DOM. If an application allows user-controlled input to be passed to the content property of an interactive image, an attacker can embed a <foreignObject tag containing malicious scripts, bypassing typical image restrictions. PoC Impact - Type: Reflected / Stored XSS (depending on data source) - Severity: Moderate - Impact: Attackers can inject malicious scripts that execute whenever the image component is rendered or updated. This is particularly dangerous for dashboards or multi-user…
Recommended action: Upgrade to 3.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
A Cross-Site Scripting (XSS) vulnerability exists in ui.addcss, ui.addscss, and ui.addsass functions in NiceGUI (v3.3.1 and earlier). These functions allow developers to inject styles dynamically. However, they lack proper sanitization or encoding for the JavaScript context they generate. An attacker can break out of the intended <style or <script tags by injecting closing tags (e.g., </style or </script), allowing for the execution of arbitrary JavaScript. Details The vulnerability stems from how these functions inject content into the DOM using client.runjavascript (or addheadhtml internally) without sufficient escaping for the transport layer. ui.addcss: Injects content into a <style tag. Input containing </style closes the tag prematurely, allowing subsequent HTML/JS injection. ui.addscss / ui.addsass: These rely on client-side compilation within <script tags. Input containing </script breaks the execution context, allowing XSS. PoC Scenario: A developer allows users to…
Recommended action: Upgrade to 3.4.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
A Cross-Site Scripting (XSS) risk exists in NiceGUI when developers render unescaped user input into the DOM using ui.html(). Before version 3.0, NiceGUI does not enforce HTML or JavaScript sanitization, so applications that directly combine components like ui.input() with ui.html() without escaping may allow attackers to execute arbitrary JavaScript in the user’s browser. Same holds for ui.chatmessage with HTML content. Applications that directly reflect user input via ui.html() (or ui.chatmessage in HTML mode) are affected. This may lead to client-side code execution (e.g., session hijacking or phishing). Applications that do not pass untrusted input into ui.html() are not affected. Details NiceGUI allows developers to bind user input directly into the DOM using ui.html() or ui.chatmessage(). However, the library does not enforce any HTML or JavaScript sanitization, which potentially creates a dangerous attack surface for developers unaware of this behavior. The vulnerable…
Recommended action: Upgrade to 3.0.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
Once a user logins to one browser, all other browsers are logged in without entering password. Even incognito mode. Impact high
Recommended action: Upgrade to 2.9.1 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.
NiceGUI is an easy-to-use, Python-based UI framework. A local file inclusion is present in the NiceUI leaflet component when requesting resource files under the /nicegui/{version}/resources/{key}/{path:path} route. As a result any file on the backend filesystem which the web server has access to can be read by an attacker with access to the NiceUI leaflet website. This vulnerability has been addressed in version 1.4.21. Users are advised to upgrade. There are no known workarounds for this vulnerability.
Recommended action: Upgrade to 1.4.21 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.