ComfyUI-Easy-Use turns a preview upload into custom-node code execution
CVE-2026-123790 is an unauthenticated path-traversal flaw in ComfyUI-Easy-Use version 1.4.1 and earlier. CERT/CC says the vulnerable save_preview() handler lets an attacker copy an uploaded Python file over an installed custom node's __init__.py. ComfyUI imports that file when it restarts, so the next process start executes attacker-controlled code with the privileges of the ComfyUI process.
The exploit needs network reachability to the affected route. It does not need an account, a crafted model file, or a user to open the workflow. The input directory and the custom-node directory share the same process boundary, and the extension allowed a request-selected filename to cross that boundary.
The path is the code boundary
ComfyUI's custom nodes are executable Python packages. They can import libraries, open sockets, read workflow files, and access environment variables. Once an attacker can write a Python entry point, the distinction between a model server and a general-purpose execution environment disappears. The process may also hold model-provider keys, cloud credentials, dataset paths, and network access to internal services.
This defect is not a prompt-injection issue. It is a file-write and import issue. A request reaches an upload handler, the handler resolves a destination path, and a later restart performs the final execution step. An external observer may see only a new or modified node file followed by a process restart.
Find instances before the restart
Inventory ComfyUI deployments and the installed extensions. Check for ComfyUI-Easy-Use 1.4.1 or earlier. Do not assume that an internal-only address is safe because workflow users can often reach the same interface. Review reverse-proxy routes, cloud ingress, VPN ACLs, and container ports for public exposure.
The fixed commit is 8a0f2fc412. The maintainer could not be reached for coordinated disclosure, and CERT/CC recommends removing the extension or restricting network access to trusted users if a verified package update is not available. Treat a repository commit as a fix only when the deployment's build process actually includes it.
Contain a suspected write
If the route was reachable, snapshot the filesystem before cleanup. Inspect custom-node directories for unexpected Python files or recent changes to __init__.py. Compare the files with the deployment package or a known-good hash. Review upload directories, process start times, installed packages, and outbound network connections. Preserve the ComfyUI environment because credentials may be recoverable from process configuration.
Disable the extension or block the affected route first. Stop the process before deleting a suspicious file so that it cannot be recreated by a still-running worker. After the file is removed, verify that no other custom node imports it and that a restart does not load the same content from a cache or persistent volume.
Rotate what the process could reach
A code-execution event should trigger credential review even if no obvious command output appears. Rotate provider API keys, object-storage credentials, database passwords, webhook secrets, and service-account tokens available to ComfyUI. Revoke sessions used by the process if the deployment model supports it. Check internal services that accepted requests from the ComfyUI host during the exposure window.
Review workflow files and generated artifacts for unauthorized changes. An attacker who could write a node may have also read model metadata or modified outputs. Compare hashes of important models and workflow definitions. Do not upload compromised model files to another environment.
Prevent the next request from becoming code
Run ComfyUI behind an authenticated reverse proxy and give the workflow UI a dedicated identity. Remove write access from the web process to installed extension directories. Mount custom nodes read-only after deployment, and use a separate controlled job to install updates. Apply a path canonicalization check that rejects traversal and writes outside an explicit upload directory.
Add an integrity test that starts the service, records the hash of every custom-node entry point, and fails if a request changes one. Monitor for restarts that occur immediately after uploads. These controls help with the current CVE and with the wider problem of treating AI workflow servers as trusted code hosts.
Top comments (0)