CVE-2026-56671
Received Received - Intake

Path Traversal in ComfyUI Prior to 0.28.0

Vulnerability report for CVE-2026-56671, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-07-31

Last updated on: 2026-07-31

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-07-31
Last Modified
2026-07-31
Generated
2026-07-31
AI Q&A
2026-07-31
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
comfyui comfyui 0.28.0

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-22 The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

ComfyUI before 0.28.0 has a path traversal flaw in get_model_preview (app/model_manager.py). An unauthenticated attacker can use directory traversal sequences, encoded paths, or absolute paths to read image-decodable files outside the intended model directory. The vulnerability arises because filename input is not sanitized before joining with the model directory path.

Detection Guidance

Check ComfyUI version for versions prior to 0.28.0. Inspect network traffic for unusual file access patterns or path traversal attempts in model preview requests. Monitor logs for errors related to path_index or file enumeration in app/model_manager.py.

Impact Analysis

An attacker could access sensitive image files on your system, including those in other directories. They could also enumerate existing paths on your host by triggering errors. The impact is limited to image-decodable files and path enumeration due to Pillow's file handling.

Compliance Impact

This vulnerability could lead to unauthorized access to sensitive data, violating GDPR's data protection principles or HIPAA's confidentiality requirements. Exposure of personal or health-related images may result in compliance breaches and regulatory penalties.

Mitigation Strategies

Upgrade ComfyUI to version 0.28.0 or later immediately. Restrict network access to ComfyUI interfaces if exposed to untrusted networks. Review and audit file access logs for suspicious activity related to model directories.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-56671. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart