CVE-2026-56671: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Comfy-Org ComfyUI
CVE-2026-56671 is a path traversal vulnerability in Comfy-Org's ComfyUI prior to version 0.28.0. The vulnerability exists in the get_model_preview function, which improperly joins an unrestricted filename route to a model directory without containment checks. This allows unauthenticated remote attackers to read image-decodable files outside the intended directory by using traversal sequences or absolute paths. The disclosed files are processed through Pillow and re-encoded as WEBP, limiting disclosure to image-compatible files and enabling file existence enumeration. The issue is fixed in version 0.28.0.
AI Analysis
Technical Summary
ComfyUI versions before 0.28.0 have a CWE-22 path traversal vulnerability in the get_model_preview function located in app/model_manager.py. The function constructs file paths by joining a user-controlled filename parameter to a model directory path without validating that the resulting path remains within the intended directory. Attackers can exploit this by supplying traversal sequences (../), percent-encoded traversal (%2e%2e%2f), or absolute paths, as well as unbounded path_index values, to access arbitrary image-decodable files on the host system. The files are then processed by the Pillow library and re-encoded as WEBP images, which limits the impact to disclosure of image-compatible files and allows enumeration of file existence through error messages. This vulnerability is addressed in ComfyUI version 0.28.0.
Potential Impact
An unauthenticated remote attacker can read arbitrary image-decodable files on the host system running ComfyUI versions prior to 0.28.0. This can lead to sensitive information disclosure limited to files processable by the Pillow library. Additionally, the vulnerability allows file existence enumeration and internal path leakage via errors triggered by unbounded path_index values. There is no indication of integrity or availability impact.
Mitigation Recommendations
This vulnerability is fixed in ComfyUI version 0.28.0. Users should upgrade to version 0.28.0 or later to remediate this issue. No official patch or temporary fix is indicated beyond upgrading. Since this is not a cloud service, remediation is the responsibility of the user.
CVE-2026-56671: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Comfy-Org ComfyUI
Description
CVE-2026-56671 is a path traversal vulnerability in Comfy-Org's ComfyUI prior to version 0.28.0. The vulnerability exists in the get_model_preview function, which improperly joins an unrestricted filename route to a model directory without containment checks. This allows unauthenticated remote attackers to read image-decodable files outside the intended directory by using traversal sequences or absolute paths. The disclosed files are processed through Pillow and re-encoded as WEBP, limiting disclosure to image-compatible files and enabling file existence enumeration. The issue is fixed in version 0.28.0.
CVSS v3.1
Score 7.5high
Affected software
Comfy-Org
ComfyUI
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
ComfyUI versions before 0.28.0 have a CWE-22 path traversal vulnerability in the get_model_preview function located in app/model_manager.py. The function constructs file paths by joining a user-controlled filename parameter to a model directory path without validating that the resulting path remains within the intended directory. Attackers can exploit this by supplying traversal sequences (../), percent-encoded traversal (%2e%2e%2f), or absolute paths, as well as unbounded path_index values, to access arbitrary image-decodable files on the host system. The files are then processed by the Pillow library and re-encoded as WEBP images, which limits the impact to disclosure of image-compatible files and allows enumeration of file existence through error messages. This vulnerability is addressed in ComfyUI version 0.28.0.
Potential Impact
An unauthenticated remote attacker can read arbitrary image-decodable files on the host system running ComfyUI versions prior to 0.28.0. This can lead to sensitive information disclosure limited to files processable by the Pillow library. Additionally, the vulnerability allows file existence enumeration and internal path leakage via errors triggered by unbounded path_index values. There is no indication of integrity or availability impact.
Mitigation Recommendations
This vulnerability is fixed in ComfyUI version 0.28.0. Users should upgrade to version 0.28.0 or later to remediate this issue. No official patch or temporary fix is indicated beyond upgrading. Since this is not a cloud service, remediation is the responsibility of the user.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-06-22T16:39:01.043Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 6a6c31249c2644c7f8578d62
Added to database: 07/31/2026, 05:22:44 UTC
Last enriched: 08/07/2026, 14:30:37 UTC
Last updated: 09/13/2026, 10:01:31 UTC
Views: 50
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.