CVE-2026-56672 ComfyUI: Stored XSS via /userdata/{file} due to Missing Content-Type Sanitization
Attackers can execute arbitrary scripts in the ComfyUI origin by uploading malicious HTML or SVG files, potentially stealing API tokens and workflows.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- None listed
What is CVE-2026-56672?
CVE-2026-56672 is a high-severity cross-site scripting vulnerability in Comfy-Org ComfyUI, published on 31 Jul 2026. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Official description
ComfyUI is a node-based diffusion model GUI, API, and backend. Prior to 0.28.0, GET /userdata/{file} served user-controlled HTML and SVG files with extension-derived content types, allowing stored cross-site scripting in the ComfyUI origin and access to browser-stored API tokens, settings, workflows, and authenticated-equivalent API calls. The handler used web.FileResponse(path), so an uploaded .html/.svg was served as text/html/image/svg+xml. POST /userdata stores arbitrary request bodies (confined to the user's userdata directory). When a victim navigated to the file URL, the embedded script executed same-origin. The /view endpoint already forced dangerous MIME types to download; that protection had never been applied to /userdata. This issue is fixed in version 0.28.0.
Weakness: CWE-79
Which versions are affected by CVE-2026-56672?
How do I fix CVE-2026-56672?
No fix has been published for CVE-2026-56672 yet. Limit exposure of the affected software until one is available.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2026-56672 being exploited?
There is no known exploitation of CVE-2026-56672 in the wild and no public exploit code.
Sources
Also known as GHSA-53g8-45wq-pcv8.