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.
Affected products
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| Comfy-Org | ComfyUI | < 0.30.0 | 0.30.0 |
References
- Researcher write-up technical-description exploit
- folder_name is joined to the output directory unsanitised technical-description
- 0.30.0 uses secure_subfolder_path patch
- https://github.com/Comfy-Org/ComfyUI product
- VulnCheck Advisory: ComfyUI before 0.30.0 Path Traversal via dataset save nodes third-party-advisory