Severity by source
AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N
Network-reachable POST/GET with no auth in default deployments (PR:N), requires victim to open the file URL (UI:R); same-origin execution crosses scope (S:C) enabling token theft (C:H) and API calls (I:L).
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
4DescriptionCVE.org
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.
AnalysisAI
Stored cross-site scripting in ComfyUI (Comfy-Org) before 0.28.0 lets an attacker upload HTML or SVG to the per-user userdata store via POST /userdata and have it served with an executable content type by GET /userdata/{file}, so a script runs in the ComfyUI origin the moment a victim opens the file URL. Because it executes same-origin, the payload can read browser-stored API tokens, settings, and workflows and issue authenticated-equivalent API calls. Rated CVSS 8.2 (High); no public exploit identified at time of analysis and it is not in CISA KEV.
Technical ContextAI
ComfyUI is a Python (aiohttp) node-based backend and web GUI for diffusion models. The flaw is CWE-79 (improper neutralization of input during web page generation) rooted in content-type handling: the /userdata GET handler used web.FileResponse(path), which derives Content-Type from the file extension, so an uploaded .html was served as text/html and an .svg as image/svg+xml - both of which browsers render and execute inline. The companion /view endpoint already forced dangerous MIME types to download, but that guard was never applied to /userdata. The fix centralizes a folder_paths.is_dangerous_content_type() check (covering text/html, image/svg+xml, JavaScript, CSS, any *+xml or */xml dialect, and message/rfc822, with charset/casing normalization) and, for /userdata, forces Content-Type to application/octet-stream, adds X-Content-Type-Options: nosniff, and sets Content-Disposition: attachment. The same commit also hardened an unrelated model-preview path-traversal/symlink escape.
RemediationAI
Vendor-released patch: upgrade to ComfyUI 0.28.0 or later, which forces user-controlled userdata files to download with Content-Disposition: attachment, X-Content-Type-Options: nosniff, and a neutralized application/octet-stream content type (see the release at https://github.com/Comfy-Org/ComfyUI/releases/tag/v0.28.0 and advisory GHSA-53g8-45wq-pcv8). If you cannot upgrade immediately, place ComfyUI behind a reverse proxy that strips inline rendering by adding Content-Disposition: attachment and X-Content-Type-Options: nosniff to responses from /userdata (accepting that legitimately previewable userdata files will now download instead of render), restrict network access to the ComfyUI port to trusted operators only, and require authentication in front of the /userdata POST/GET endpoints so untrusted parties cannot write or serve files. Avoid opening /userdata file URLs received from untrusted sources until patched.
Arbitrary file write via path traversal in ComfyUI before 0.30.0 lets an attacker place attacker-controlled content anyw
comfyanonymous/comfyui version v0.2.4 suffers from a non-blind Server-Side Request Forgery (SSRF) vulnerability. Rated h
A stored cross-site scripting (XSS) vulnerability exists in comfyanonymous/comfyui version 0.2.2 and possibly earlier. R
Remote code execution in ComfyUI v0.23.0 (and all prior 0.x releases) lets unauthenticated attackers run arbitrary Pytho
Stored cross-site scripting in ComfyUI before 0.28.0 lets an attacker upload a malicious SVG that the /view endpoint ser
Unauthenticated information disclosure in ComfyUI (comfy-org/comfyui) before 0.28.0 lets remote attackers read arbitrary
Path traversal arbitrary file read in ComfyUI (comfy-org) before 0.28.0 lets remote unauthenticated attackers probe arbi
Path traversal in ComfyUI up to version 0.13.0 allows authenticated remote attackers to read arbitrary files on the serv
Path traversal in ComfyUI up to version 0.13.0 allows authenticated remote attackers to read arbitrary files via manipul
Cross-site request forgery (CSRF) in ComfyUI up to version 0.13.0 allows unauthenticated remote attackers to modify appl
Cross-site scripting (XSS) in ComfyUI up to version 0.13.0 allows authenticated remote attackers to inject malicious scr
Stored cross-site scripting (XSS) in ComfyUI's userdata endpoint (getuserdata function in app/user_manager.py) allows au
Same weakness CWE-79 – Cross-site Scripting (XSS)
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-51402