Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft malicious workflow with traversal folder_name
-
DeliveryDistribute via model/workflow sharing channel
-
ExploitVictim loads workflow in ComfyUI
-
ExecutionDataset save node writes outside output dir
-
PersistOverwrite startup file / package initializer
-
ImpactCode execution on host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK
2 techniques across 2 tactics: Discovery, Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires a victim to load and execute an attacker-crafted ComfyUI workflow whose dataset save node supplies an unsanitized folder_name containing path-traversal sequences (reference: comfy_extras/nodes_dataset.py lines 303-318 in v0.24.0). No authentication is required (PR:N), but user interaction is mandatory (UI:P) - the attacker must convince the victim to import/run the malicious workflow. The condition is present in default configurations of affected versions (any ComfyUI before 0.30.0) that use the dataset save nodes; code execution is not immediate but follows once the written startup file or package initializer is loaded. The vendor scores this AV:L (local), which limits the raw vector, though network-exposed ComfyUI instances may widen delivery options. |
| Impact | This is a genuine priority for anyone running ComfyUI, though not an unauthenticated remote 'internet-worm' class flaw. The vendor CVSS 4.0 vector (AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H, score 8.5) describes a locally-vectored, low-complexity, unauthenticated path traversal whose only meaningful gate is passive user interaction (UI:P) - a victim loading a crafted workflow. Technical impact is total (full C/I/A on the host via arbitrary file write leading to code execution through modified startup files or package initializers). A public POC exists (geo-chen/oss writeup) and a vendor patch is available, which raises real-world risk versus a theoretical bug. There is no CISA KEV listing and no EPSS score in the provided data, so status is 'publicly available exploit code exists' but NOT confirmed active exploitation - treat as high-likelihood-if-targeted rather than mass-exploited. One signal to verify: the vendor scored AV:L (local), but ComfyUI is frequently run as a network-exposed web service where a workflow could be delivered remotely - if the instance is reachable over the network, real-world attack surface is broader than AV:L implies; confirm the deployment exposure model. |
| Exploit ScenarioDerived | An attacker publishes an attractive-looking ComfyUI workflow (e.g., on a model-sharing site or forum) whose dataset save node contains a folder_name with directory-traversal sequences pointing outside the output directory. When a victim imports and runs the workflow, ComfyUI writes attacker-controlled content to a sensitive location such as a Python startup file or package __init__.py, achieving code execution on next load. A public proof-of-concept demonstrating the traversal is available. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Sep 16, 2026
Arbitrary file write via path traversal in ComfyUI before 0.30.0 lets an attacker place attacker-controlled content anywhere on the host filesystem by supplying a crafted folder_name to the dataset save nodes. According to the vendor vector, no authentication is required (PR:N), but exploitation requires user interaction in the form of the victim loading and running a malicious workflow (UI:P); code execution does not occur immediately and instead follows when the written startup file or package initializer is subsequently loaded. Publicly available exploit code exists (a published PoC walkthrough and a VulnCheck advisory), the affected versions are in default configurations, and the vendor has released a fix in 0.30.0; there is no indication of confirmed active exploitation (CISA KEV), and this is not an unauthenticated remote worm-class flaw despite its 8.5 severity, because the local vector and mandatory workflow-import step constrain delivery.
RemediationAI
Vendor-released patch: upgrade to ComfyUI 0.30.0 or later, which contains the corrected path handling in comfy_extras/nodes_dataset.py (patch reference: https://github.com/Comfy-Org/ComfyUI/blob/v0.30.0/comfy_extras/nodes_dataset.py; vulnerability detail: https://www.vulncheck.com/advisories/comfyui-before-0.30.0-path-traversal-via-dataset-save-nodes). Until every instance is upgraded, the highest-value compensating control is to never load or execute workflow JSON from untrusted or third-party sources - this directly defeats the mandatory UI:P precondition at the cost of restricting community workflow sharing. Where shared workflows must be used, run ComfyUI as an unprivileged dedicated user inside a container or VM whose filesystem is read-only except for an explicitly mounted output directory, and enable a container security profile that denies writes to user home directories, shell rc files, and site-packages; the trade-off is that model caches, custom-node installs, and Python package updates must then be routed through writable mounts or performed by rebuilding the image, and GPU passthrough and large model mounts need explicit configuration. Because ComfyUI ships without authentication, do not expose the web UI to untrusted networks - bind it to localhost or place it behind an authenticating reverse proxy and restrict it to trusted users; this reduces the pool of victims who can be socially engineered into importing a malicious graph but does not fix the underlying traversal. Finally, add file-integrity or audit monitoring for new or modified files outside the designated output directory (especially shell startup files and Python package initializers under site-packages), which converts the second stage of the chain into a detectable event; host-based agent coverage and log volume are the associated costs.
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
The root cause is CWE-22 (Improper Limitation of a Pathname to a Restricted Directory, i.e. path traversal) in ComfyUI's dataset nodes - specifically comfy_extras/nodes_dataset.py, where the affected logic is located at lines 303-318 of v0.24.0. ComfyUI is a node-graph execution environment for diffusion models: users construct or import workflows as JSON graph definitions, and each node executes its own handler with user-supplied parameters. The dataset save nodes accept a folder_name parameter and concatenate it into an output path without canonicalizing or validating the result against the intended output directory, so values containing '../' sequences escape the sandbox that the output-directory convention is supposed to provide. Because the write primitive is a general file write rather than a model-artifact write, an attacker can target sensitive destinations such as shell startup files or Python package initializers, converting the file write into code execution once the operating system or interpreter loads the planted file on a subsequent session - which is why the CNA describes the impact as enabling RCE. The supplied CPE string cpe:2.3:a:comfy-org:comfyui:*:*:*:*:*:*:*:* covers all releases prior to the fixed 0.30.0 build, and the ENISA EUVD entry (EUVD-2026-81074) mirrors the range comfyui 0 < 0.30.0. Note that the CVSS 4.0 base vector carries AT:N, PR:N, UI:P and full VC/VI/VA of the vulnerable system with no subsequent-system impact (SC:N/SI:N/SA:N), which matches the independent assessment's insistence that this is a file-write-to-code-execution chain gated on user interaction rather than an immediate remote compromise.
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
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Local vector via loading a crafted workflow requires user interaction (UI:R) but no privileges (PR:N); arbitrary file write to startup files yields full code execution, so C/I/A:H, S:U on the same host.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
ComfyUI before 0.30.0 fails to sanitize folder_name input in dataset save nodes, allowing attackers to write files to arbitrary paths outside the output directory. Attackers can load a crafted workflow that writes attacker-controlled content to arbitrary locations, enabling code execution through modified startup files or package initializers.
Technical POC Analysis
CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), manifesting as arbitrary file write.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Latest POC
1 PoC candidate from github (unverified)
Sign in to open the public PoC links collected for this CVE.
Executive ViewAI
ComfyUI deployments running versions before 0.30.0 are exposed to a high-severity file-write flaw that can allow an attacker to plant malicious content on the host, with code execution possible when that content is later loaded. Although publicly available exploit code exists, exploitation requires a user to import and run a crafted workflow, so the immediate risk is concentrated in teams that routinely run untrusted ComfyUI workflows on shared or production systems. Leadership should act because the affected versions are in default configurations and a successful compromise could affect the workstation or server hosting AI generation pipelines.
Apply vendor patch.
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
Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
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 (Comfy-Org) before 0.28.0 lets an attacker upload HTML or SVG to the per-user use
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-81074
GHSA-xhvx-vf8p-rh4x
NVD
CVE.org
EPSS
VulDB
Exploit-DB