CVE-2026-45553: NiceGUI Local File Disclosure Vulnerability
HIGHCVE-2026-45553 is a HIGH (CVSS 7.5) local file disclosure vulnerability (CWE-200: Exposure of Sensitive Information to an Unauthorized Actor) affecting NiceGUI libraries in the PyPI ecosystem. The issue involves local file disclosure via docutils file insertion in ui.restructured_text(). Remediation is available by upgrading affected packages to version 3.12.0.
CVE-2026-45553 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N).
How to Fix CVE-2026-45553
To remediate this vulnerability, upgrade all affected NiceGUI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install nicegui>=3.12.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show nicegui
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-45553, inspect your installed packages using pip:
pip show nicegui
Analyze the terminal output to locate any version of NiceGUI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.12.0), your application is affected.
Note: The pip show nicegui command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-200: Exposure of Sensitive Information to an Unauthorized Actor, where the product exposes sensitive information to an actor that is not explicitly authorized to have access to that information. In NiceGUI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-45553 Affected NiceGUI Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
nicegui
|
PyPI |
< 3.12.0
|
3.12.0
|
References
Frequently Asked Questions
What is CVE-2026-45553?
Which NiceGUI versions are affected?
What version fixes CVE-2026-45553?
Is nicegui affected?
What is the CVSS score of CVE-2026-45553?
What CWE is associated with CVE-2026-45553?
How can I check PyPI dependencies for CVE-2026-45553?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jfrm-rx66-g536",
"modified" : "2026-06-09T10:58:07Z",
"published" : "2026-05-18T20:21:59Z",
"aliases" : [ "CVE-2026-45553" ],
"summary" : "NiceGUI: Local file disclosure via Docutils file insertion in ui.restructured_text()",
"details" : "### Summary\n\n`ui.restructured_text()` renders reStructuredText server-side with Docutils without disabling file insertion directives.\n\nWhen a NiceGUI application passes attacker-controlled content to `ui.restructured_text()`, 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.\n\nApplications that only pass trusted static strings to `ui.restructured_text()` are not affected.\n\n### Details\n\nThe affected component is the reStructuredText renderer:\n\n- File: `nicegui/elements/restructured_text.py`\n- Function: `prepare_content()`\n\n`prepare_content()` renders user-supplied reStructuredText through Docutils:\n\n```python\nhtml = publish_parts(\n remove_indentation(content),\n writer_name='html4',\n settings_overrides={'syntax_highlight': 'short'},\n)\n```\n\nThe Docutils call only sets `syntax_highlight`. 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 read server-side.\n\nA minimal vulnerable usage pattern is any page that forwards untrusted input into `ui.restructured_text()`, e.g. content taken from query parameters, form fields, or other user-controlled sources.\n\n### Impact\n\nLocal file disclosure. An attacker who can supply reStructuredText content can read files accessible to the NiceGUI server process. Depending on deployment, this may expose:\n\n- application `.env` files\n- database URLs, API tokens, session/storage secrets\n- OAuth or cloud credentials\n- Docker or Kubernetes mounted secrets\n- application source files\n- logs and other process-readable files\n\nThe confirmed impact is confidentiality loss through arbitrary local file read. Applications are only impacted when they pass untrusted or user-controlled reStructuredText into `ui.restructured_text()`.\n\n### Recommended fix\n\nDisable unsafe Docutils features in `prepare_content()`:\n\n```python\nhtml = publish_parts(\n remove_indentation(content),\n writer_name='html4',\n settings_overrides={\n 'syntax_highlight': 'short',\n 'file_insertion_enabled': False,\n 'raw_enabled': False,\n '_disable_config': True,\n },\n)\n```\n\nThis blocks the `include`, `csv-table :file:`, and `raw :file:` directives as well as local `docutils.conf` overrides.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "nicegui"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.12.0"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.11.1"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/zauberzeug/nicegui/security/advisories/GHSA-jfrm-rx66-g536"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-45553"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/zauberzeug/nicegui"
}, {
"type" : "WEB",
"url" : "https://github.com/zauberzeug/nicegui/releases/tag/v3.12.0"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-18T20:21:59Z",
"nvd_published_at" : "2026-06-02T16:16:41Z"
}
}