CVE-2026-56671
JSON

7.5high

ComfyUI: Path traversal in /experiment/models/preview allows arbitrary image file read

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.66% (higher than 52% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M

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.

Affected

Product or packageVersionsReported by
Comfy-Org ComfyUI< 0.28.0CVE List

Classification

CWE-22

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

NVD (es)

ComfyUI es una GUI modular de modelo de difusión, API y backend con una interfaz de grafo/nodos. Antes de la versión 0.28.0, get_model_preview en app/model_manager.py une una captura de ruta de nombre de archivo sin restricciones a un directorio de modelo seleccionado sin una verificación de contención, permitiendo a un atacante remoto no autenticado usar recorrido, recorrido codificado, rutas absolutas o un path_index ilimitado para leer archivos decodificables como imagen y enumerar rutas de host. get_model_preview (app/model_manager.py) construyó la ruta con os.path.join(folder, filename) donde filename es una captura de ruta {filename:.*} sin restricciones. .. / literal, %2e%2e%2f codificado en porcentaje y rutas absolutas escaparon del directorio del modelo; path_index también era ilimitado. El archivo objetivo se canaliza a través de Pillow y se recodifica como WEBP, por lo que la divulgación se limita a archivos decodificables como imagen más un oráculo de existencia/enumeración de archivos (y fuga de rutas internas a través de errores de path_index). Este problema está solucionado en la versión 0.28.0.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-56671 changed 2026-07-31CVE Terms of Use
NVDCVE-2026-56671 changed 2026-10-23Public domain