GHSA-jfrm-rx66-g536
HIGHGHSA-jfrm-rx66-g536 is a high-severity (CVSS 7.5) Information Exposure vulnerability in nicegui. O3 Security confirms whether GHSA-jfrm-rx66-g536 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
NiceGUI: Local file disclosure via Docutils file insertion in ui.restructured_text()
Exploitation Status
No confirmed exploitation observed yet
- CISA assesses this as automatable — exploitation doesn’t require manual, per-target effort, which raises the odds of mass scanning and opportunistic attacks.
- CISA’s own triage has not observed active exploitation or public proof-of-concept code for this CVE as of its last assessment.
Exploitation and automatability from CISA’s SSVC triage for GHSA-jfrm-rx66-g536.
EPSS Exploitation Probability
EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.
How urgent is this, really
GHSA-jfrm-rx66-g536 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.
Where this sits among everything scored
Of 0 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.
Real-World Exposure
niceguiReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | nicegui | all versions | 3.12.0 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for nicegui. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update nicegui to 3.12.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-jfrm-rx66-g536 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-jfrm-rx66-g536 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-jfrm-rx66-g536. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-jfrm-rx66-g536 in your dependencies?
O3 detects GHSA-jfrm-rx66-g536 across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.