CVE-2026-68771

ComfyUI 0.23.0 Unauthenticated RCE via LoadTrainingDataset Pickle Deserialization

Published Jul 31, 2026 CVSS 4.0 · 9.3 Critical EPSS 1.1% KEV · Not listed
Description
ComfyUI v0.23.0 contains an unsafe deserialization vulnerability in the LoadTrainingDataset node that allows unauthenticated remote attackers to execute arbitrary Python code by uploading a crafted pickle file and triggering its deserialization. Attackers can upload a malicious shard_*.pkl file via the unauthenticated POST /upload/image endpoint and then queue a workflow graph via POST /prompt referencing the uploaded file, causing torch.load to deserialize the attacker-controlled pickle payload using __reduce__ and execute arbitrary commands as the ComfyUI process user.

Analysis

AI-generated

Technical impact

ComfyUI v0.23.0 contains an unsafe deserialization flaw in the LoadTrainingDataset node that permits unauthenticated attackers to execute arbitrary Python code. By uploading a malicious pickle file through the public POST /upload/image endpoint and then queuing a workflow with POST /prompt that references the file, the server deserializes the payload with torch.load. The exploit relies on Python’s __reduce__ method in the pickle, causing the server to run attacker‑supplied commands as the ComfyUI process user, providing full remote code execution.

Affected Systems

The vulnerability is present in ComfyUI from the Comfy‑Org project, specifically version 0.23.0. No other versions or products are listed as affected in the current data.

Risk and Exploitability

The CVSS score of 9.3 marks this flaw as critical, while the EPSS score of less than 1% indicates a low probability of observed exploitation. The attack vector is unauthenticated HTTP requests; an adversary only needs network access to the endpoint to trigger the deserialization. Although the flaw is not yet catalogued as a known exploited vulnerability in CISA KEV, the impact of successful exploitation—arbitrary code execution on the host—demands aggressive countermeasures.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade ComfyUI to the latest release where the unsafe Pickle deserialization in LoadTrainingDataset has been removed or corrected
  • If an upgrade is not immediately possible, remove or comment out the LoadTrainingDataset node from the server’s node definitions to eliminate the deserialization entry point
  • Enforce authentication or block public access to the POST /upload/image endpoint using a firewall, reverse proxy, or internal network controls to prevent unauthenticated uploads

Generated by OpenCVE AI on August 2, 2026 at 03:52 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
CPEs cpe:2.3:a:comfy:comfyui:*:*:*:*:*:*:*:*
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Comfy
Comfy comfyui
Vendors & Products Comfy
Comfy comfyui
Type Values Removed Values Added
Description ComfyUI v0.23.0 contains an unsafe deserialization vulnerability in the LoadTrainingDataset node that allows unauthenticated remote attackers to execute arbitrary Python code by uploading a crafted pickle file and triggering its deserialization. Attackers can upload a malicious shard_*.pkl file via the unauthenticated POST /upload/image endpoint and then queue a workflow graph via POST /prompt referencing the uploaded file, causing torch.load to deserialize the attacker-controlled pickle payload using __reduce__ and execute arbitrary commands as the ComfyUI process user.
Title ComfyUI 0.23.0 Unauthenticated RCE via LoadTrainingDataset Pickle Deserialization
Weaknesses CWE-502
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}

Weaknesses
  • CWE-502

    Deserialization of Untrusted Data

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 8, 2026, 2:08 PM
Reserved
Jul 31, 2026, 4:10 PM
Status
Deferred
Published
Jul 31, 2026, 10:17 PM
Modified
Oct 23, 2026, 11:10 PM