Junglewise Threat Intelligence

CVE-2025-66470: NiceGUI stored/reflected XSS in ui.interactive_image via unsanitized SVG

CVE-2025-66470 · Severity: low · CVSS 3.1 · Published 2025-12-08

Technologies: Zauberzeug Nicegui.

Executive brief

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.

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

Timeline

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

References