Description
ComfyUI is a modular diffusion model GUI, api and backend with a graph/nodes interface. Prior to 0.28.0, get_model_preview in app/model_manager.py joins an unrestricted filename route capture to a selected model directory without a containment check, allowing an unauthenticated remote attacker to use traversal, encoded traversal, absolute paths, or an unbounded path_index to read image-decodable files and enumerate host paths. get_model_preview (app/model_manager.py) built the path with os.path.join(folder, filename) where filename is an unrestricted {filename:.*} route capture. Literal ../, percent-encoded %2e%2e%2f, and absolute paths all escaped the model directory; path_index was also unbounded. The target file is piped through Pillow and re-encoded as WEBP, so disclosure is limited to image-decodable files plus a file-existence/enumeration oracle (and internal-path leakage via path_index errors). This issue is fixed in version 0.28.0.
Published: 2026-07-31
Score: 7.5 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

ComfyUI’s get_model_preview endpoint constructs file paths by concatenating an unrestricted filename route capture with the selected model directory using os.path.join. Without a containment check, the endpoint allows traversal characters, URL‑encoded traversal, absolute paths, and even an unbounded path_index, enabling an unauthenticated remote attacker to read arbitrary image‑decodable files from the host filesystem. The disclosed data is limited to files that Pillow can process and to a file‑existence oracle, but enumeration of host paths is possible via error messages or path_index responses. This vulnerability maps directly to the file‑path traversal weakness, CWE‑22.

Affected Systems

All publicly available releases of Comfy‑Org’s ComfyUI prior to version 0.28.0 are affected. Users of v0.27.x or older may be exposed to this path traversal flaw. The issue is resolved in the 0.28.0 release, which sanitizes the filename before path construction.

Risk and Exploitability

The CVSS base score of 7.5 signifies a high‑level severity for remote unauthenticated exploitation. The EPSS score is less than 1%, indicating a very low but non‑zero likelihood of exploitation. The lack of authentication requirements and the simplicity of the attack path—based on the description, the attack vector is inferred to be remote via an HTTP request to the /experiment/models/preview endpoint—make exploitation likely in practice. The vulnerability is not catalogued in CISA’s KEV list, but the lack of constraints on the endpoint means that any user who can reach the service could leverage the flaw, making it a significant risk for exposed deployments.

Generated by OpenCVE AI on August 2, 2026 at 04:35 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to ComfyUI v0.28.0 or newer, which sanitizes filenames and removes the traversal path.
  • If an upgrade is not immediately possible, restrict access to the /experiment/models/preview endpoint to authenticated or trusted users only.
  • Monitor incoming requests for traversal patterns (e.g., "..", "%2e%2e%2f") and block or rate‑limit such traffic.

Generated by OpenCVE AI on August 2, 2026 at 04:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Sun, 02 Aug 2026 19:45:00 +0000

Type Values Removed Values Added
First Time appeared Comfy
Comfy comfyui
Vendors & Products Comfy
Comfy comfyui

Sat, 01 Aug 2026 00:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Fri, 31 Jul 2026 05:30:00 +0000

Type Values Removed Values Added
Description ComfyUI is a modular diffusion model GUI, api and backend with a graph/nodes interface. Prior to 0.28.0, get_model_preview in app/model_manager.py joins an unrestricted filename route capture to a selected model directory without a containment check, allowing an unauthenticated remote attacker to use traversal, encoded traversal, absolute paths, or an unbounded path_index to read image-decodable files and enumerate host paths. get_model_preview (app/model_manager.py) built the path with os.path.join(folder, filename) where filename is an unrestricted {filename:.*} route capture. Literal ../, percent-encoded %2e%2e%2f, and absolute paths all escaped the model directory; path_index was also unbounded. The target file is piped through Pillow and re-encoded as WEBP, so disclosure is limited to image-decodable files plus a file-existence/enumeration oracle (and internal-path leakage via path_index errors). This issue is fixed in version 0.28.0.
Title ComfyUI: Path traversal in /experiment/models/preview allows arbitrary image file read
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-07-31T23:19:15.408Z

Reserved: 2026-06-22T16:39:01.043Z

Link: CVE-2026-56671

cve-icon Vulnrichment

Updated: 2026-07-31T23:19:11.546Z

cve-icon NVD

Status : Received

Published: 2026-07-31T06:16:29.860

Modified: 2026-08-01T00:17:17.373

Link: CVE-2026-56671

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-02T19:30:17Z

Weaknesses
  • CWE-22

    Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')