Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach ComfyUI web API
-
DeliveryPOST crafted .html/.svg to /userdata
-
ExploitSend GET /userdata/{file} URL to victim
-
ExecutionVictim opens URL, script runs same-origin
-
PersistSteal API tokens and settings
-
ImpactIssue authenticated-equivalent API calls
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Output encoding, context-aware escaping
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Execution The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires (1) the ability to write a file via POST /userdata - in a default no-auth ComfyUI deployment this is any network-reachable party, but an authenticated or proxied deployment limits it to users who can write to a userdata directory; (2) an uploaded file with an executable extension (.html, .svg, or other dangerous MIME dialects such as *+xml) since the pre-0.28.0 handler derived Content-Type from the extension via web.FileResponse; and (3) user interaction - a victim must actively navigate to the GET /userdata/{file} URL in a browser sharing the ComfyUI origin/session. Exploitation is limited by that mandatory victim click (UI:R), by any authentication placed in front of /userdata, and it does not apply to instances already on 0.28.0 where dangerous types are forced to download. |
| Impact | The provided CVSS 3.1 vector (AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N, 8.2) describes a network-reachable, low-complexity, no-privilege attack that requires victim interaction (opening the malicious file URL) and results in a scope change with high confidentiality impact - consistent with same-origin token theft. There is no EPSS score, no KEV listing, and no POC in the supplied data, so real-world exploitation pressure is currently low-to-unknown despite the high base score. The PR:N rating assumes the common default ComfyUI deployment with no authentication in front of /userdata; in a multi-user or auth-gated deployment the attacker would need the ability to write to a userdata directory, raising the practical bar. Net: a genuine, well-understood stored-XSS priority for any internet- or LAN-exposed ComfyUI instance, but the requirement that a victim navigate to the attacker's file (UI:R) makes it a targeted/social-engineering vector rather than a wormable mass-exploitation risk. |
| Exploit ScenarioDerived | An attacker who can reach the ComfyUI web API sends POST /userdata storing a small .html or .svg file containing JavaScript, then delivers the resulting GET /userdata/{file} URL to an operator (e.g., via chat or a workflow share). When the victim opens the link in the same browser session used for ComfyUI, the script runs in the ComfyUI origin and exfiltrates browser-stored API tokens and settings or drives authenticated-equivalent API calls. No public POC is identified, and the AC:L/UI:R profile means the only real hurdle is convincing the victim to click the link. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 31, 2026
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.
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.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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.
Know when Comfyui gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
2DescriptionCVE.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.
Executive ViewAI
ComfyUI installations prior to version 0.28.0 contain a stored cross-site scripting vulnerability that allows attackers to steal authentication tokens and API credentials from authorized users. Any organization deploying ComfyUI faces a material risk of account compromise and unauthorized system access if users interact with malicious workflow files or links. Immediate remediation is required to prevent credential theft and unauthorized access to integrated systems.
No vendor-released patch identified at time of analysis. Interim mitigations: restrict file uploads to administrators only, disable untrusted workflow imports, rotate and invalidate all API tokens and browser credentials that may have been exposed, implement network segmentation to limit ComfyUI access to authorized users only, and enable logging and alerting on authenticated API calls for anomaly detection.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Cross-Site Scripting occurs when an application accepts untrusted data and sends it to a web browser without proper validation or encoding.
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
EUVD-2026-51402
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB