Skip to content
HighVulnerability

CVE-2026-56672: ComfyUI stored cross-site scripting via GET /userdata/{file}

Identifier
CVE-2026-56672
Published
Record updated
View JSON

Summary

ComfyUI versions before 0.28.0 served user-uploaded HTML and SVG files from GET /userdata/{file} with content types derived from the file extension, so the handler's web.FileResponse(path) returned them as text/html or image/svg+xml. An attacker could store a file with embedded script through POST /userdata and have it run same-origin when a victim opened the URL, exposing browser-stored API tokens, settings, workflows and authenticated-equivalent API calls. The /view endpoint already forced dangerous MIME types to download, but that protection had never been applied to /userdata.

Mitigation

Fixed in 0.28.0.