Impact
The ComfyUI server exposes a /userdata/{file} endpoint that serves user‑supplied HTML and SVG files with MIME types derived solely from the file extension. Because the handler uses a web.FileResponse on the provided path, an attacker who can place a malicious .html or .svg file into a user's data directory can cause the browser to interpret it as text/html or image/svg+xml and execute embedded JavaScript. The code runs with the same origin as ComfyUI, giving the attacker access to any browser‑stored API tokens, user settings, and the ability to perform authenticated‑equivalent requests on behalf of the victim. No input sanitization or Content‑Disposition controls were applied to the userdata route, which enabled the stored XSS vector.
Affected Systems
The flaw exists in all versions of the Comfy‑Org ComfyUI product before release 0.28.0; version 0.28.0 and newer contain a fix that properly sanitizes content types and changes the /userdata endpoint so that files are served as downloads rather than inline content. Users running older releases are susceptible if they have not removed hostile .html or .svg files from their userdata directories.
Risk and Exploitability
The vulnerability carries a CVSS score of 8.2 (High) and an EPSS score of less than 1 %, indicating a low probability of exploitation detected in the public threat landscape but still a real risk for exposed servers. The exploitable path requires an attacker to upload a malicious file to the target's userdata directory and for a victim to load that file in a browser; thus the attack can be triggered remotely if a user is lured to the file URL. The flaw is not listed in the CISA KEV catalog, so no known active exploit is documented, but its high severity justifies prioritizing a patch or mitigative controls.
OpenCVE Enrichment