Executive brief
ComfyUI, a popular interface for AI diffusion models, was found to be vulnerable to a security flaw that could allow attackers to steal sensitive information. By tricking a user into clicking a malicious link, an attacker could execute scripts in the user's browser to access API tokens, private workflows, and account settings. This could lead to unauthorized access to the user's AI generation environment and data.
Technical details
A stored cross-site scripting (XSS) vulnerability exists in ComfyUI prior to version 0.28.0. The 'GET /userdata/{file}' endpoint served user-uploaded files using extension-derived Content-Types without proper sanitization or download enforcement. An attacker can use 'POST /userdata' to upload malicious HTML or SVG files containing scripts. When a victim navigates to the file's URL, the script executes within the ComfyUI origin, providing access to browser-stored API tokens (auth_token_comfy_org), settings, and workflows. The fix in version 0.28.0 forces dangerous MIME types to 'application/octet-stream' and implements 'Content-Disposition: attachment' and 'X-Content-Type-Options: nosniff'.
Affected products
- Comfy-Org ComfyUI < 0.28.0
Timeline
- 2026-07-02: patched: Fix committed to repository
- 2026-07-15: advisory: GitHub Security Advisory published
- 2026-07-31: disclosed: CVE published to NVD