Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessIdentify NiceGUI endpoint reflecting user input
-
DeliveryCraft rST payload with .. include:: or raw :file: directive
-
ExploitSubmit payload via query string or form
-
ExecutionDocutils reads target file server-side
-
PersistSensitive file contents embedded in rendered HTML response
-
ImpactAttacker harvests secrets from response body
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V14 - Data Protection Data exposure prevention
MITRE ATT&CK
2 techniques across 2 tactics: Collection, Discovery The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target NiceGUI application (version <= 3.11.1) explicitly call ui.restructured_text() with content derived from an untrusted source - query parameters, form fields, uploaded documents, database fields populated by users, or any other attacker-influenced input. The vulnerable code path is not triggered for apps that render only static, developer-authored reStructuredText strings, which is the most common usage pattern. No authentication, user interaction, or special privileges are required once that code path exists (CVSS PR:N/UI:N), and the attacker only needs network reachability to the rendering endpoint. Limiting factors: the bug is confidentiality-only (no RCE or write primitive), files must be readable by the NiceGUI server process UID, and exploitation does not work against deployments that already pin Docutils with file_insertion_enabled=False at the application level. |
| Impact | The CVSS 3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) reflects network-reachable, unauthenticated, low-complexity exploitation with high confidentiality impact and no integrity/availability effect - consistent with the file-read primitive described. The vulnerability is not in CISA KEV and no EPSS score was provided in the input, so real-world exploitation likelihood cannot be quantitatively assessed. The practical risk is gated by application design: only deployments that route untrusted input (query params, form fields, uploads) into ui.restructured_text() are exposed, which is a non-default coding pattern. Where that pattern exists, however, exploitation is trivial and yields direct disclosure of .env files, cloud/OAuth tokens, and Kubernetes/Docker mounted secrets - making it a high-priority fix for affected apps despite being a conditional code-path issue. |
| Exploit ScenarioDerived | An attacker visits a NiceGUI page that reflects a query-string parameter (e.g., /preview?rst=...) into ui.restructured_text() and submits a payload such as '.. include:: /app/.env' or '.. raw:: html\n :file: /etc/passwd'. Docutils opens the referenced file server-side and embeds its contents into the rendered HTML returned to the attacker's browser, leaking secrets, API tokens, or source code. No authentication or user interaction is required and CVSS AC:L indicates a single request is sufficient; no public exploit identified at time of analysis, but the advisory documents the exact directives needed. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – May 18, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
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.
Executive ViewAI
NiceGUI versions 3.11.1 and earlier contain a file disclosure vulnerability enabling remote, unauthenticated access to arbitrary files including credentials and source code. Organizations using affected versions face immediate risk of sensitive data exposure and potential downstream compromise. No vendor patch is currently available.
No vendor-released patch identified at time of analysis. Interim mitigations: (1) Disable or restrict use of ui.restructured_text() with untrusted input; (2) Implement application-level filtering of Docutils directives (include, csv-table, raw) before passing to the function; (3) Apply least privilege file system permissions to server process; (4) Monitor and alert on suspicious file access patterns.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
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
EUVD-2026-33963
GHSA-jfrm-rx66-g536
NVD
CVE.org
EPSS
Exploit-DB