Skip to main content

NiceGUI CVE-2026-45553

| EUVDEUVD-2026-33963 HIGH
Information Exposure (CWE-200)
2026-05-18 https://github.com/zauberzeug/nicegui GHSA-jfrm-rx66-g536
7.5
CVSS 3.1 · Vendor: https://github.com/zauberzeug/nicegui
Share

Severity by source

Vendor (https://github.com/zauberzeug/nicegui) PRIMARY
7.5 HIGH
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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None

Lifecycle Timeline

2
Source Code Evidence Fetched
May 18, 2026 - 21:08 vuln.today
Analysis Generated
May 18, 2026 - 21:08 vuln.today

Blast Radius

ecosystem impact
† from your stack dependencies † transitive graph · vuln.today resolves 4-path depth
  • 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:

python
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 .env files
  • 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():

python
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.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

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

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

Share

CVE-2026-45553 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy