Search for packages
| purl | pkg:pypi/nicegui@1.4.16 |
| Vulnerability | Summary | Fixed by |
|---|---|---|
|
VCID-1p1q-5q27-euha
Aliases: CVE-2026-27156 GHSA-78qv-3mpx-9cqq |
NiceGUI vulnerable to XSS via Code Injection during client-side element function execution 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. |
Affected by 2 other vulnerabilities. |
|
VCID-21u4-fgck-mye1
Aliases: CVE-2025-21618 GHSA-v6jv-p6r8-j78w |
NiceGUI On Air authentication issue Once a user logins to one browser, all other browsers are logged in without entering password. Even incognito mode. |
Affected by 9 other vulnerabilities. |
|
VCID-2kbx-8xs3-p3gs
Aliases: CVE-2026-25516 GHSA-v82v-c5x8-w282 |
NiceGUI's XSS vulnerability in ui.markdown() allows arbitrary JavaScript execution through unsanitized HTML content 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.chat_message()`, `ui.interactive_image()`), the `ui.markdown()` component does not provide or require a `sanitize` parameter, leaving applications vulnerable to XSS attacks. |
Affected by 3 other vulnerabilities. |
|
VCID-3hyc-h7ym-y7c9
Aliases: CVE-2025-66470 GHSA-2m4f-cg75-76w2 |
NiceGUI Stored/Reflected XSS in ui.interactive_image via unsanitized SVG content A Cross-Site Scripting (XSS) vulnerability exists in the `ui.interactive_image` 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. |
Affected by 9 other vulnerabilities. |
|
VCID-4btp-8pnj-rbgj
Aliases: CVE-2025-66645 GHSA-hxp3-63hc-5366 |
NiceGUI has a path traversal in app.add_media_files() allows arbitrary file read A directory traversal vulnerability in NiceGUI's `App.add_media_files()` allows a remote attacker to read arbitrary files on the server filesystem. |
Affected by 9 other vulnerabilities. |
|
VCID-a4cq-3qf6-z7hv
Aliases: CVE-2026-39844 GHSA-w8wv-vfpc-hw2w |
NiceGUI: Upload filename sanitization bypass via backslashes allows path traversal on Windows ### Summary 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/upload_files.py` uses: ```python filename = PurePosixPath(upload.filename or '').name ``` `PurePosixPath` treats backslashes as literal characters, not path separators: ```python >>> PurePosixPath('..\\..\\secret\\evil.txt').name '..\\..\\secret\\evil.txt' # Not stripped! ``` 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 code execution** through overwriting application files or placing executables in known locations - **Data integrity loss** through overwriting existing files Linux and macOS are not affected, as they treat backslashes as literal filename characters. |
Affected by 0 other vulnerabilities. |
|
VCID-dgqv-w1gf-qqby
Aliases: CVE-2025-66469 GHSA-72qc-wxch-74mg |
NiceGUI Reflected XSS in ui.add_css, ui.add_scss, and ui.add_sass via Style Injection A Cross-Site Scripting (XSS) vulnerability exists in `ui.add_css`, `ui.add_scss`, and `ui.add_sass` 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. |
Affected by 9 other vulnerabilities. |
|
VCID-fwyg-jtwk-kkbh
Aliases: CVE-2026-25732 GHSA-9ffm-fxg3-xrhh PYSEC-2026-95 |
NiceGUI is a Python-based UI framework. Prior to 3.7.0, NiceGUI's FileUpload.name property exposes client-supplied filename metadata without sanitization, enabling path traversal when developers use the pattern UPLOAD_DIR / 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. This vulnerability is fixed in 3.7.0. |
Affected by 3 other vulnerabilities. |
|
VCID-uz4k-r9c3-y3ea
Aliases: CVE-2025-53354 GHSA-8c95-hpq2-w46f |
NiceGUI has a Reflected XSS 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.chat_message` with HTML content. Applications that directly reflect user input via `ui.html()` (or `ui.chat_message` 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. |
Affected by 12 other vulnerabilities. |
|
VCID-yru8-rc3x-4uad
Aliases: CVE-2024-32005 GHSA-mwc7-64wg-pgvj |
NiceGUI allows potential access to local file system 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. |
Affected by 10 other vulnerabilities. |
|
VCID-ztpy-m9yn-ukb4
Aliases: CVE-2026-33332 GHSA-w5g8-5849-vj76 |
NiceGUI's unvalidated chunk size parameter in media routes can cause memory exhaustion ## Summary NiceGUI's `app.add_media_file()` and `app.add_media_files()` 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.add_media_file()` or `app.add_media_files()`, 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 parameter. ## Remediation Upgrade to a patched version of NiceGUI. As a workaround, restrict access to media endpoints or strip unexpected query parameters at a reverse proxy layer. |
Affected by 1 other vulnerability. |
| Vulnerability | Summary | Aliases |
|---|---|---|
| This package is not known to fix vulnerabilities. | ||