# CVE-2026-45553: NiceGUI local file disclosure in ui.restructured_text

Source: https://junglewise.ai/threats/cve-2026-45553-nicegui-local-file-disclosure-in-ui-restructured-text  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-06-02. Updated: 2026-06-02  
License: CC BY 4.0 with a link back

CVE-2026-45553 · Severity: high · CVSS 7.5 · Published 2026-06-02

NiceGUI is a Python framework used for building web-based user interfaces. A vulnerability in its text rendering component allows attackers to read sensitive files from the server's local storage if the application displays user-provided text. This could lead to the exposure of configuration files, API keys, database credentials, and other private data, potentially compromising the entire application environment.

Technologies: [nicegui (PyPI)](https://junglewise.ai/threats/technologies/nicegui). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-45553 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-45553 being exploited in the wild.

**How severe is CVE-2026-45553?** High severity, with a CVSS score of 7.5, published 2 June 2026.

**Which products and versions are affected?** nicegui (PyPI) <= 3.11.1, ECOSYSTEM:introduced=0,fixed=3.12.0.

**Is there a fix for CVE-2026-45553?** Yes. nicegui (PyPI): upgrade to 3.12.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-45553 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-45553?** Check whether you run nicegui (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- nicegui (PyPI): upgrade to 3.12.0 or later

  ```sh
  pip install "nicegui>=3.12.0"
  ```


## Technical details

The vulnerability exists in the `ui.restructured_text()` component of NiceGUI due to an insecure configuration of the underlying Docutils library. Specifically, the `prepare_content()` function in `nicegui/elements/restructured_text.py` fails to disable file insertion and raw directives when calling `publish_parts()`. An unauthenticated remote attacker can exploit this by submitting specially crafted reStructuredText containing directives such as `include`, `csv-table` with `:file:`, or `raw` with `:file:`. If the application passes this attacker-controlled content to the renderer, the server will embed the contents of local files into the generated HTML. This issue is patched in version 3.12.0 by setting `file_insertion_enabled` and `raw_enabled` to False in the Docutils settings.

## Affected products

- zauberzeug NiceGUI <= 3.11.1

## Identifiers

- CVE-2026-45553
- GHSA-jfrm-rx66-g536
- PYSEC-2026-2679

## Timeline

- 2026-05-12: patched: Version 3.12.0 released
- 2026-05-12: advisory: GitHub Security Advisory GHSA-jfrm-rx66-g536 published
- 2026-06-02: disclosed: NVD publication date

## References

- [https://github.com/zauberzeug/nicegui/releases/tag/v3.12.0](https://github.com/zauberzeug/nicegui/releases/tag/v3.12.0)
- [https://github.com/zauberzeug/nicegui/security/advisories/GHSA-jfrm-rx66-g536](https://github.com/zauberzeug/nicegui/security/advisories/GHSA-jfrm-rx66-g536)

## Related threats

- [PYSEC-2026-1703 - NiceGUI has Redis connection leak via tab storage causes service degradation](https://junglewise.ai/threats/cve-2026-21874-nicegui-has-redis-connection-leak-via-tab-storage-causes-service)
- [PYSEC-2026-1702 - NiceGUI apps which use `ui.sub_pages` vulnerable to zero-click XSS](https://junglewise.ai/threats/cve-2026-21873-nicegui-apps-which-use-ui-sub-pages-vulnerable-to-zero-click-xss)
- [PYSEC-2026-1701 - NiceGUI apps are vulnerable to XSS which uses `ui.sub_pages` and render arbitrary user-provided links](https://junglewise.ai/threats/cve-2026-21872-nicegui-apps-are-vulnerable-to-xss-which-uses-ui-sub-pages-and)
- [PYSEC-2026-1698 - NiceGUI is vulnerable to XSS via Unescaped URL in ui.navigate.history.push() / replace()](https://junglewise.ai/threats/cve-2026-21871-nicegui-is-vulnerable-to-xss-via-unescaped-url-in-ui-navigate)
- [PYSEC-2026-1697 - NiceGUI Reflected XSS in ui.add_css, ui.add_scss, and ui.add_sass via Style Injection](https://junglewise.ai/threats/cve-2025-66469-nicegui-reflected-xss-in-ui-add-css-ui-add-scss-and-ui-add-sass)
