Skip to content
Threat Feed
high advisory

Path Traversal in ComfyUI Dataset Save Nodes

ComfyUI versions prior to 0.30.0 are vulnerable to path traversal via unsanitized input in dataset save nodes, allowing attackers to write arbitrary files and potentially achieve code execution.

CVE search metadata

CVE search record: CVE-2026-92816. Severity: high. CVSS: 7.8. KEV: no. Product: ComfyUI (< 0.30.0). Brief: Path Traversal in ComfyUI Dataset Save Nodes. Brief link: https://feed.craftedsignal.io/briefs/2026-09-comfyui-path-traversal/

ComfyUI versions before 0.30.0 contain a critical path traversal vulnerability (CVE-2026-92816) within its dataset save nodes. The application fails to properly sanitize the 'folder_name' parameter, which is used to define the destination directory for saved files. By providing a crafted 'folder_name' string containing directory traversal sequences, an authenticated or remote attacker can escape the intended output directory and write files to arbitrary locations on the host filesystem. This vulnerability is particularly dangerous in the context of ComfyUI, as an attacker with the ability to write files to the filesystem can overwrite critical startup scripts, configuration files, or package initialization modules. Successful exploitation leads to arbitrary code execution within the security context of the ComfyUI process. Users are advised to upgrade to version 0.30.0 or later to mitigate this risk.

Attack Chain

  1. Attacker identifies a target instance of ComfyUI running a version earlier than 0.30.0.
  2. Attacker crafts a malicious workflow containing a dataset save node configuration.
  3. Attacker sets the 'folder_name' parameter in the dataset save node to include directory traversal sequences (e.g., ../../../).
  4. Attacker uploads or executes the crafted workflow within the ComfyUI interface.
  5. ComfyUI backend processes the 'folder_name' input without sanitization.
  6. The application performs a file write operation to the destination path specified by the traversal sequences.
  7. Attacker overwrites a system-level startup script or Python package initialization file with malicious code.
  8. Upon restart of the ComfyUI service or specific process execution, the malicious code is triggered, resulting in code execution.

Impact

The vulnerability carries a CVSS v3.1 base score of 7.8. Successful exploitation allows for arbitrary file write, which facilitates full system compromise via code execution. This impacts any organization or individual running vulnerable versions of ComfyUI in environments where the service is accessible to untrusted parties.

Recommendation

Prioritized actions for security teams:

  • Patch ComfyUI: Upgrade all instances to version 0.30.0 or later immediately to address CVE-2026-92816.
  • Review Audit Logs: Investigate webserver logs for requests involving dataset save nodes that contain non-alphanumeric characters or path traversal sequences like '../'.
  • Restrict Access: Ensure ComfyUI instances are not exposed to the public internet and restrict access to authenticated, trusted users only.
  • Principle of Least Privilege: Run the ComfyUI service under a dedicated, low-privileged user account to limit the impact of potential code execution scenarios.

Immediate actions

Upgrade ComfyUI to 0.30.0 or later to patch CVE-2026-92816

IT Operations 24h

Mitigations

Patch ComfyUI to 0.30.0

immediate IT Operations

CVE-2026-92816