Summary
CVE-2026-68771 is a critical unauthenticated remote code execution (RCE) vulnerability affecting ComfyUI v0.23.0 and all earlier versions, stemming from unsafe pickle deserialization in the LoadTrainingDataset built-in node (CWE-502). With a CVSS 4.0 score of 9.3 (CRITICAL) and no authentication, user interaction, or special conditions required, any attacker with network access to an exposed ComfyUI instance can achieve full arbitrary code execution on the host server.
Technical details
- Root cause: The
LoadTrainingDatasetnode incomfy_extras/nodes_dataset.pycallstorch.load()without theweights_only=Truesafety flag. On affected PyTorch versions whereweights_onlydefaults toFalse, this permits unrestricted pickle deserialization of attacker-controlled.pklfiles, allowing arbitrary Python objects — including malicious__reduce__payloads — to be instantiated during loading. - Attack vector: Fully network-accessible, requiring zero authentication across both steps of the exploit chain.
- Trigger conditions: Two sequential unauthenticated HTTP requests to the ComfyUI API are sufficient: (1) upload a crafted
shard_*.pklfile viaPOST /upload/image(no authentication required), then (2) queue a workflow graph viaPOST /promptthat references the uploaded file, causingtorch.load()to deserialize the malicious pickle payload. - Impact: Arbitrary Python code executes as the ComfyUI process user, enabling full host compromise — including credential theft, exfiltration of AI model weights and workflows, cryptominer installation, and lateral movement within the hosting environment.
Affected software
- ComfyUI — all versions from 0 through v0.23.0 (inclusive)
Severity
CVSS v3.1 base score: 9.8 (CRITICAL)
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Mitigation and recommended actions
- Immediate — patch: Upgrade ComfyUI to the latest available release. The fix was delivered in pull request #14543 ("harden: load training-dataset shards with weights_only=True", merged June 18, 2026, commit
94ee49b), which restrictstorch.load()deserialization incomfy_extras/nodes_dataset.pyto safe tensor-compatible data only. - If immediate patching is not feasible: Enforce network-layer access controls to ensure that the
/upload/imageand/promptHTTP endpoints are not reachable from untrusted networks. Place ComfyUI behind a reverse proxy with authentication enforcement. ComfyUI should never be directly exposed to the public internet without authentication controls, as both exploit endpoints are unauthenticated by default.
IONIX Status
The IONIX research team is tracking ongoing exploitation attempts and recommends immediate patching. Potentially affected assets are outlined in this post.

