CVE-2026-56672
JSON

8.2high

ComfyUI: Stored XSS via /userdata/{file} due to Missing Content-Type Sanitization

Severity
8.2high CVSS:3.1 by GitHub_M
Exploit likelihood
0.24% (higher than 15% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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.

Affected

Product or packageVersionsReported by
Comfy-Org ComfyUI< 0.28.0CVE List

Classification

CWE-79

SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.

What each source says

CVE List

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.

NVD (es)

ComfyUI es una GUI, API y backend de modelo de difusión basado en nodos. Antes de la versión 0.28.0, GET /userdata/{file} servía archivos HTML y SVG controlados por el usuario con tipos de contenido derivados de la extensión, permitiendo cross-site scripting almacenado en el origen de ComfyUI y acceso a tokens de API almacenados en el navegador, configuraciones, flujos de trabajo y llamadas a la API equivalentes a autenticadas. El gestor utilizaba web.FileResponse(path), por lo que un .html/.svg subido se servía como text/html/image/svg+xml. POST /userdata almacena cuerpos de solicitud arbitrarios (confinados al directorio userdata del usuario). Cuando una víctima navegaba a la URL del archivo, el script incrustado se ejecutaba con el mismo origen. El endpoint /view ya forzaba la descarga de tipos MIME peligrosos; esa protección nunca se había aplicado a /userdata. Este problema está solucionado en la versión 0.28.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-56672 changed 2026-07-31CVE Terms of Use
NVDCVE-2026-56672 changed 2026-10-23Public domain