Description
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.
Severity (CVSS)
| Base score | 8.5 |
|---|---|
| Severity | High |
| Version | CVSS 4.0 |
| Vector | 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 |
| Provided by | CNA |
Weaknesses
- CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Comfy-Org | ComfyUI | 0 to <0.30.0 |
References
- https://github.com/geo-chen/oss/blob/main/ComfyUI.md (technical-description exploit)
- https://github.com/Comfy-Org/ComfyUI/blob/v0.24.0/comfy_extras/nodes_dataset.py#L303-L318 (technical-description)
- https://github.com/Comfy-Org/ComfyUI/blob/v0.30.0/comfy_extras/nodes_dataset.py (patch)
- https://github.com/Comfy-Org/ComfyUI (product)
- https://www.vulncheck.com/advisories/comfyui-before-0.30.0-path-traversal-via-dataset-save-nodes (third-party-advisory)
Generated from the official CVE List on 17 Sep 2026 07:04 UTC.