CVE-2026-68771: ComfyUI: unauthenticated RCE via pickle upload
CRITICAL CISA: TRACK*ComfyUI's LoadTrainingDataset node deserializes user-supplied pickle files with torch.load, and because the upload endpoint (POST /upload/image) and the workflow queue endpoint (POST /prompt) both require no authentication, any unauthenticated attacker who can reach a ComfyUI instance can achieve full remote code execution simply by uploading a crafted shard_*.pkl and referencing it in a workflow graph. This is a CVSS 9.8 critical vulnerability with network attack vector, no privileges and no user interaction required — the lowest possible bar for exploitation — and ComfyUI instances are frequently exposed directly to the internet or GPU rental networks without a reverse-proxy auth layer, which materially raises real-world exposure even though EPSS data isn't yet available and it hasn't appeared in CISA KEV or public exploit repositories. No proof-of-concept or Nuclei template is public yet, but pickle deserialization RCEs are trivial to weaponize with widely available tooling, so the absence of a public exploit should not be read as low urgency. Security teams running ComfyUI for image/video generation or training-data pipelines should immediately check whether the fix (GitHub PR #14543 / commit 94ee49b) is applied, restrict /upload/image and /prompt behind authentication or network ACLs, and treat any unexplained process spawned by the ComfyUI service account as a compromise indicator.
What is the risk?
Critical. The combination of CVSS 9.8, zero authentication, zero user interaction, and a well-understood exploitation primitive (Python pickle __reduce__ RCE) puts this at the top of the risk stack for any organization self-hosting ComfyUI. The mitigating factor is exposure timing, not exploitability: this is not currently in CISA KEV, EPSS scoring is unavailable, and no public exploit or Nuclei template exists yet, so internet-wide opportunistic scanning has likely not started at scale. However, ComfyUI is commonly deployed by ML/creative teams on GPU hosts with permissive network rules and no reverse proxy in front, so any organization that exposed an instance directly to the internet or a shared VPC should treat this as urgent regardless of KEV/EPSS status.
How does the attack unfold?
How severe is it?
What is the attack surface?
What should I do?
1 step-
Patch: update to the ComfyUI release containing the fix in PR #14543 / commit 94ee49b, which addresses the unsafe torch.load deserialization in LoadTrainingDataset. Workaround if patching is delayed: never expose ComfyUI's HTTP API directly to the internet — put it behind a reverse proxy with authentication (basic auth, OAuth proxy, or VPN-only access), and restrict /upload/image and /prompt to trusted networks. Detection: monitor for unexpected .pkl uploads (especially shard_*.pkl), unusual child processes spawned by the ComfyUI service account, and unexpected outbound connections from the ComfyUI host. Longer-term: replace pickle-based data loading with safetensors where possible, and scan uploaded artifacts with a tool like picklescan before allowing deserialization.
What does CISA's SSVC say?
Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-68771?
ComfyUI's LoadTrainingDataset node deserializes user-supplied pickle files with torch.load, and because the upload endpoint (POST /upload/image) and the workflow queue endpoint (POST /prompt) both require no authentication, any unauthenticated attacker who can reach a ComfyUI instance can achieve full remote code execution simply by uploading a crafted shard_*.pkl and referencing it in a workflow graph. This is a CVSS 9.8 critical vulnerability with network attack vector, no privileges and no user interaction required — the lowest possible bar for exploitation — and ComfyUI instances are frequently exposed directly to the internet or GPU rental networks without a reverse-proxy auth layer, which materially raises real-world exposure even though EPSS data isn't yet available and it hasn't appeared in CISA KEV or public exploit repositories. No proof-of-concept or Nuclei template is public yet, but pickle deserialization RCEs are trivial to weaponize with widely available tooling, so the absence of a public exploit should not be read as low urgency. Security teams running ComfyUI for image/video generation or training-data pipelines should immediately check whether the fix (GitHub PR #14543 / commit 94ee49b) is applied, restrict /upload/image and /prompt behind authentication or network ACLs, and treat any unexplained process spawned by the ComfyUI service account as a compromise indicator.
Is CVE-2026-68771 actively exploited?
No confirmed active exploitation of CVE-2026-68771 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-68771?
Patch: update to the ComfyUI release containing the fix in PR #14543 / commit 94ee49b, which addresses the unsafe torch.load deserialization in LoadTrainingDataset. Workaround if patching is delayed: never expose ComfyUI's HTTP API directly to the internet — put it behind a reverse proxy with authentication (basic auth, OAuth proxy, or VPN-only access), and restrict /upload/image and /prompt to trusted networks. Detection: monitor for unexpected .pkl uploads (especially shard_*.pkl), unusual child processes spawned by the ComfyUI service account, and unexpected outbound connections from the ComfyUI host. Longer-term: replace pickle-based data loading with safetensors where possible, and scan uploaded artifacts with a tool like picklescan before allowing deserialization.
What systems are affected by CVE-2026-68771?
This vulnerability affects the following AI/ML architecture patterns: training pipelines, model serving.
What is the CVSS score for CVE-2026-68771?
CVE-2026-68771 has a CVSS v3.1 base score of 9.8 (CRITICAL). The EPSS exploitation probability is 0.78%.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0011.000 Unsafe AI Artifacts AML.T0049 Exploit Public-Facing Application AML.T0050 Command and Scripting Interpreter AML.T0112 Machine Compromise Compliance Controls Affected
What are the technical details?
Original Advisory
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.
Exploitation Scenario
An attacker scans for internet-facing ComfyUI instances (common on GPU rental marketplaces, homelab setups, and internal ML servers without auth in front of them), then sends a crafted shard_*.pkl file containing a malicious __reduce__ payload to the unauthenticated POST /upload/image endpoint. The attacker then submits a workflow graph via POST /prompt referencing a LoadTrainingDataset node that points at the uploaded file. When ComfyUI processes the queued workflow, it calls torch.load on the attacker's pickle, triggering __reduce__ and executing an arbitrary OS command — for example a reverse shell, or a script that exfiltrates API keys and model weights, installs a cryptominer on the GPU, or pivots to other hosts on the same network.
Weaknesses (CWE)
CWE-502 — Deserialization of Untrusted Data: The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
- [Architecture and Design, Implementation] If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
- [Implementation] When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
Source: MITRE CWE corpus.
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H References
Timeline
Related Vulnerabilities
CVE-2025-59528 10.0 Flowise: Unauthenticated RCE via MCP config injection
Same attack type: Supply Chain CVE-2024-2912 10.0 BentoML: RCE via insecure deserialization (CVSS 10)
Same attack type: Supply Chain CVE-2023-3765 10.0 MLflow: path traversal allows arbitrary file read
Same attack type: Supply Chain CVE-2025-5120 10.0 smolagents: sandbox escape enables unauthenticated RCE
Same attack type: Supply Chain CVE-2026-21858 10.0 n8n: Input Validation flaw enables exploitation
Same attack type: Code Execution