DEV Community

Anoymask
Anoymask

Posted on Edited on

ComfyUI-Easy-Use CVE-2026-123790: Unauthenticated Path Traversal Leading to Remote Code Execution on Restart

1. Basic Information

  • Advisory Name: ComfyUI-Easy-Use contains unauthenticated path traversal vulnerability
  • Publisher: CERT/CC
  • Publication Date: 2026-11-12
  • Updated Date: 2026-11-12
  • Collection Date: 2026-11-14T08:00:43+09:00
  • Source: CERT/CC
  • Related Information Sources: JVN: ComfyUI-Easy-Use path traversal
  • Related Malware: None
  • Related Threat Groups: None
  • Related CVE: CVE-2026-123790
  • Affected Products & Technologies: ComfyUI-Easy-Use <= 1.4.1, ComfyUI
  • Response Priority (Author Assessment): Critical
  • Priority Rationale: An unauthenticated attacker who can reach the affected routes on an internet-exposed AI workflow server can execute OS commands with the privileges of the ComfyUI process when ComfyUI restarts and access models, workflows, and credentials.

2. Summary

CERT/CC reported a vulnerability in ComfyUI-Easy-Use 1.4.1 and earlier where an unauthenticated attacker can upload a Python file, use path traversal in save_preview() to overwrite a custom node's __init__.py file, and achieve code execution when ComfyUI restarts.

3. Attack Flow

From Upload to RCE Upon Restart

  1. An unauthenticated attacker uploads a crafted Python file to the input directory.
  2. The attacker triggers path traversal via save_preview() to overwrite a custom node file.
  3. ComfyUI restarts.
  4. The modified module is imported, and OS commands are executed with the process privileges.

4. Attacker Position and Execution Location

  • An unauthenticated remote attacker who can reach the ComfyUI HTTP service.

5. Visibility for Victims and Administrators

Victim Side

  • May appear as an AI service restart, workflow anomaly, or model/output modification.

Administrator Side

  • May appear as input uploads or custom_nodes hash changes.
  • Inference: May be observed as unexpected child processes spawned after a restart, or as egress traffic if subsequent actions are performed.

6. Success and Failure Conditions

Success Conditions

  • The affected extension is enabled, and the endpoint is reachable.
  • Path traversal allows writing to the custom node path.
  • ComfyUI restarts.

Failure Conditions and Mitigations

  • Isolate the service from the internet and place it behind an authentication proxy.
  • Remove the extension or update it to the fix commit or later.
  • Set the custom_nodes directory to read-only.

7. Impact Upon Success

  • Execution of OS commands with ComfyUI process privileges.
  • Theft or modification of models, workflows, outputs, and credentials.

8. Observable Logs

  • Email: None specified
  • Proxy/SWG/DNS: Inference: Requests containing path traversal sequences can be observed if the proxy logs request contents.
  • Endpoint EDR: Python file modifications under custom_nodes.
  • Endpoint EDR — Inference: Child-process creation may be observable if ComfyUI spawns child processes immediately after a restart.
  • Identity/IdP: None specified
  • SaaS/Cloud: Inference: Can be observed if model registries or cloud tokens are used in subsequent actions.
  • Network: ComfyUI upload / save_preview requests.
  • Network — Inference: Can be observed if unexpected egress traffic occurs during subsequent actions.

9. Attack Success Assessment

Public Information and Initial Execution Criteria

  • Public Information: CERT/CC states that the reporter confirmed the vulnerability in versions up to 1.4.1.
  • Confirmation Scope: Confirmation of the vulnerability has been reported, but the public advisory does not provide detailed code-execution verification results or confirm whether exploitation has occurred in the wild.

10. Investigation Playbook

  • Trigger: custom_nodes modification, save_preview traversal, or shell access after restart.
  • Initial Checks: Check extension versions, exposure status, last restart time, and file mtime/hashes.
  • Endpoint: Preserve input files, custom_nodes, the process tree, and container layers.
  • Identity/Cloud: Check service tokens, cloud keys, and model registry credentials.
  • Follow-on: Track model/workflow modifications, added nodes, and lateral access.
  • Containment: Isolate the service, perform a clean rebuild, patch the extension, and rotate secrets.
  • Classification: Distinguish between upload-only, file overwrite, restart execution, and credential access.

11. Defense and Detection Ideas

  • Single Event: Modifications to an installed custom node's __init__.py file under custom_nodes, hash changes in Python files, or shell execution originating from ComfyUI.
  • Time Series: Correlate upload -> save_preview -> file change -> restart -> egress traffic.
  • Hunting: Search for identical hashes/content between input and custom_nodes, and processes spawned after past restarts.
  • Logging Gaps: Because payloads remain dormant before a restart, file integrity telemetry is critical.
  • Priority Controls: Prioritize network isolation, authentication, and a read-only node tree.

12. Facts, Inference, and Hypothesis

Facts

  • Attackers can upload Python payloads to the input directory.
  • Path traversal via save_preview() can overwrite custom node files such as __init__.py.
  • Overwritten Python modules are imported when ComfyUI restarts, executing code with process privileges.
  • The impact includes reading and modifying models, workflows, and credentials, as well as executing OS commands.
  • The maintainer's fix commit 8a0f2fc412c1c6f9109e9392064800a87a706775 has been provided, but an official release or vendor statement was not confirmed at the time of publication.

Inference

  • GPU/AI servers may hold cloud credentials or model registry tokens, so an application compromise could extend to supply chains and cloud environments.

Hypothesis

  • No additional hypotheses.

13. MITRE ATT&CK Mapping

No relevant MITRE ATT&CK techniques were mapped in the source text.

14. Unknowns and Additional Investigation

  • Official releases containing the fix, all affected deployments, and the presence of active in-the-wild exploitation remain unconfirmed.

15. Impact on SOCs and Organizations

Do not expose ComfyUI directly to the internet. Remove the extension or update it to the fix commit or later, and verify the integrity of the custom_nodes and input directories.

16. Summary by Role

  • For SOCs: Monitor input uploads, save_preview paths, custom_nodes modifications, and Python child processes spawned immediately after a restart.
  • For Administrators: Remove or patch extensions, enforce authentication proxies, restrict network access, and use low-privilege containers.
  • For Users: Verify that administrators have applied patches before submitting sensitive prompts, models, or credentials to shared AI servers.

Top comments (0)