Description
NiceGUI is a Python-based UI framework. Prior to version 3.12.0, ui.restructured_text() renders reStructuredText server-side with Docutils without disabling file insertion directives. When 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. Applications that only pass trusted static strings to ui.restructured_text() are not affected. This issue has been patched in version 3.12.0.
Published: 2026-06-02
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

NiceGUI is a Python‑based UI framework that renders reStructuredText on the server using Docutils. In versions prior to 3.12.0 the rendering function ui.restructured_text() does not disable file insertion directives. When an application processes attacker‑controlled content through this function, the embedded Docutils directives (include, csv-table :file:, raw :file:) allow the underlying server process to read any files it can access. The vulnerability therefore permits an attacker to disclose local files that are readable by the NiceGUI server process, which could contain sensitive configuration or credential information. This is a classic local file disclosure flaw identified as CWE‑200.

Affected Systems

The vendor is zauberzeug's NiceGUI framework. All supported versions of NiceGUI older than 3.12.0 are affected. The issue was corrected in release v3.12.0, so applications using any prior version (e.g., 3.11.x or earlier releases) are at risk unless they restrict the input to trusted static strings as noted by the guidance.

Risk and Exploitability

The CVSS base score of 7.5 indicates the vulnerability has a medium to high severity. The EPSS score is not available, so the current exploitation probability is uncertain, and the vulnerability is not listed in the CISA KEV catalog. The attack is possible when an attacker can influence the data passed to ui.restructured_text(); the report implies an attacker could supply crafted reStructuredText content via any public endpoint that accepts user input. If the application exposes such endpoints, an attacker could obtain arbitrary local files from the server. While no public exploit is documented, the presence of file insertion directives makes exploitation straightforward for a skilled attacker.

Generated by OpenCVE AI on June 2, 2026 at 16:21 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade NiceGUI to version 3.12.0 or later, which removes the vulnerable behaviour.
  • If an upgrade is not feasible, avoid passing untrusted or user‑supplied content to ui.restructured_text() and instead use trusted static strings or a whitelist approach.
  • As a temporary containment measure, configure Docutils or the underlying server to disallow file insertion directives or restrict the server process’s filesystem permissions so that only expected files are readable.

Generated by OpenCVE AI on June 2, 2026 at 16:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-jfrm-rx66-g536 NiceGUI: Local file disclosure via Docutils file insertion in ui.restructured_text()
History

Wed, 03 Jun 2026 14:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 02 Jun 2026 16:45:00 +0000

Type Values Removed Values Added
First Time appeared Zauberzeug
Zauberzeug nicegui
Vendors & Products Zauberzeug
Zauberzeug nicegui

Tue, 02 Jun 2026 15:45:00 +0000

Type Values Removed Values Added
Description NiceGUI is a Python-based UI framework. Prior to version 3.12.0, ui.restructured_text() renders reStructuredText server-side with Docutils without disabling file insertion directives. When 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. Applications that only pass trusted static strings to ui.restructured_text() are not affected. This issue has been patched in version 3.12.0.
Title NiceGUI: Local file disclosure via Docutils file insertion in ui.restructured_text()
Weaknesses CWE-200
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}


Subscriptions

Zauberzeug Nicegui
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-06-03T13:49:28.209Z

Reserved: 2026-05-12T17:48:47.880Z

Link: CVE-2026-45553

cve-icon Vulnrichment

Updated: 2026-06-03T13:49:23.396Z

cve-icon NVD

Status : Deferred

Published: 2026-06-02T16:16:41.833

Modified: 2026-06-02T17:15:44.040

Link: CVE-2026-45553

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-06-02T16:30:13Z

Weaknesses
  • CWE-200

    Exposure of Sensitive Information to an Unauthorized Actor