Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Primary rating from Vendor (https://github.com/zauberzeug/nicegui) · only source for this CVE.
CVSS VectorVendor: https://github.com/zauberzeug/nicegui
Lifecycle Timeline
2Blast Radius
ecosystem impact- 1 pypi packages depend on nicegui (1 direct, 0 indirect)
Ecosystem-wide dependent count for version 3.12.0.
DescriptionCVE.org
Summary
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.
Details
The affected component is the reStructuredText renderer:
- File:
nicegui/elements/restructured_text.py - Function:
prepare_content()
prepare_content() renders user-supplied reStructuredText through Docutils:
html = publish_parts(
remove_indentation(content),
writer_name='html4',
settings_overrides={'syntax_highlight': 'short'},
)The 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.
A 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.
Impact
Local file disclosure. An attacker who can supply reStructuredText content can read files accessible to the NiceGUI server process. Depending on deployment, this may expose:
- application
.envfiles - database URLs, API tokens, session/storage secrets
- OAuth or cloud credentials
- Docker or Kubernetes mounted secrets
- application source files
- logs and other process-readable files
The 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().
Recommended fix
Disable unsafe Docutils features in prepare_content():
html = publish_parts(
remove_indentation(content),
writer_name='html4',
settings_overrides={
'syntax_highlight': 'short',
'file_insertion_enabled': False,
'raw_enabled': False,
'_disable_config': True,
},
)This blocks the include, csv-table :file:, and raw :file: directives as well as local docutils.conf overrides.
AnalysisAI
Local file disclosure in NiceGUI versions <= 3.11.1 allows remote unauthenticated attackers to read arbitrary files accessible to the server process when applications pass user-controlled content to ui.restructured_text(). The flaw stems from Docutils being invoked without disabling file-insertion directives (include, csv-table :file:, raw :file:), enabling exfiltration of secrets, credentials, and source code. No public exploit identified at time of analysis, but the vendor advisory provides full directive-level proof patterns.
Technical ContextAI
NiceGUI is a Python-based UI framework (pkg:pip/nicegui) that wraps a server-rendered web interface. The vulnerable function prepare_content() in nicegui/elements/restructured_text.py calls Docutils' publish_parts() with only syntax_highlight set, leaving file_insertion_enabled and raw_enabled at their permissive defaults. Docutils' reStructuredText parser supports directives such as .. include::, .. csv-table:: :file:, and .. raw:: html :file:, which open and embed local filesystem content at render time. This maps to CWE-200 (Exposure of Sensitive Information) via server-side directive processing; because the file is read before HTML reaches the browser, no client-side sanitizer or CSP can block it.
RemediationAI
Vendor-released patch: NiceGUI 3.12.0 - upgrade via pip install --upgrade nicegui>=3.12.0 per the GHSA-jfrm-rx66-g536 advisory. If immediate upgrade is not possible, the workaround is to stop passing any untrusted input to ui.restructured_text() (sanitize or hard-code the rstcontent) or monkey-patch prepare_content() to call publish_parts with settings_overrides including file_insertion_enabled=False, raw_enabled=False, and _disable_config=True - this disables the include, csv-table :file:, and raw :file: directives and prevents local docutils.conf overrides, with the trade-off that legitimate file-include directives in trusted documents will also stop working. As a deployment-layer compensating control, run the NiceGUI process under a least-privileged user account in a chrooted/containerized filesystem so that even if exploitation occurs, sensitive files like .env, cloud credentials, and mounted Kubernetes secrets are not readable; note this does not eliminate the vulnerability and may break apps that rely on broader filesystem access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Same weakness CWE-200 – Information Exposure
View allSame technique Information Disclosure
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-33963
GHSA-jfrm-rx66-g536