Skip to main content
EPSS 0.7%top 50%

CVE-2026-56671: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in Comfy-Org ComfyUI

0
High
VulnerabilityCVE-2026-56671cvecve-2026-56671cwe-22
Published: 07/31/2026 (07/31/2026, 04:21:54 UTC)
Source: CVE Database V5
Vendor/Project: Comfy-Org
Product: 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

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
None
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

Affected software

Comfy-Org

ComfyUI

Affected versions
<0.28.0

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/07/2026, 14:30:37 UTC

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.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

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 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

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

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses