# CVE-2025-66470: PYSEC-2026-1696 - NiceGUI Stored/Reflected XSS in ui.interactive_image via unsanitized SVG content

Source: https://junglewise.ai/threats/cve-2025-66470-nicegui-stored-reflected-xss-in-ui-interactive-image-via  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-12-09. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2025-66470 · Severity: medium · CVSS 6.1 · Published 2025-12-09

NiceGUI is a Python web framework for building interactive dashboards and web applications. The ui.interactive_image component fails to sanitize SVG content before rendering it in the browser, allowing attackers to inject malicious JavaScript that executes when users view images with crafted SVG payloads. In applications displaying user-generated content or annotations, this could enable account takeover, data theft, or malware distribution.

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

## Quick answers

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

**How severe is CVE-2025-66470?** Medium severity, with a CVSS score of 6.1, published 9 December 2025.

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

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

**How is CVE-2025-66470 attacked?** It is attacked over the network.

**Am I affected by CVE-2025-66470?** Check whether you run nicegui (PyPI) or Zauberzeug Nicegui 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.4.0 or later

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


## Technical details

The vulnerability is a Cross-Site Scripting (XSS) flaw in the ui.interactive_image component (nicegui/elements/interactive_image.js). The component uses Vue's v-html directive to render SVG content without sanitization: `<g v-html="content"></g>`. An attacker can inject malicious HTML via SVG &lt;foreignObject&gt; tags containing event handlers (e.g., img onerror=alert()) to execute arbitrary JavaScript. The attack requires user interaction (viewing the rendered component) but no authentication or special privileges. Exploitation is possible if an application accepts user-controlled input for the content property. The vulnerability affects all versions through 3.3.1; a patch is available in version 3.4.0.

## Affected products

- Zauberzeug NiceGUI <= 3.3.1

## Identifiers

- CVE-2025-66470
- GHSA-2m4f-cg75-76w2
- PYSEC-2026-1696

## Timeline

- 2025-12-08: disclosed
- 2025-12-08: patched: Fix available in version 3.4.0

## References

- [https://github.com/zauberzeug/nicegui/security/advisories/GHSA-2m4f-cg75-76w2](https://github.com/zauberzeug/nicegui/security/advisories/GHSA-2m4f-cg75-76w2)

## 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)
