Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach exposed ComfyUI API
-
DeliveryUpload malicious shard_*.pkl via POST /upload/image
-
ExploitQueue workflow referencing file via POST /prompt
-
ExecutionLoadTrainingDataset calls torch.load on pickle
-
Persist__reduce__ executes payload
-
ImpactArbitrary code runs as ComfyUI user
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the target run ComfyUI 0.23.0 or earlier with its HTTP API network-reachable to the attacker, and that both the unauthenticated POST /upload/image and POST /prompt endpoints be accessible (their default, out-of-the-box state). The attacker must upload a crafted shard_*.pkl file and queue a workflow graph that invokes the LoadTrainingDataset node against that file so torch.load deserializes it. No authentication, credentials, or user interaction is needed (PR:N/UI:N). The principal limiting factor is network exposure: ComfyUI is often deployed as a localhost/LAN-only service, so instances bound to loopback or behind an authenticating proxy/VPN are not remotely exploitable; a build containing commit 94ee49b (weights_only=True) is also not vulnerable. |
| Impact | This is a genuine high-priority issue, not a high-CVSS-but-low-risk case. The CVSS 4.0 vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H, score 9.3) aligns fully with the description: network-reachable, low complexity, no privileges, no user interaction, full confidentiality/integrity/availability impact on the vulnerable system. Deserialization RCE via pickle is a well-understood, reliable, automatable exploitation class, so real-world exploitability is high once an instance is exposed. The main mitigating factor is exposure rather than difficulty: ComfyUI is typically run as a local or LAN service, so internet-exposed instances are the primary risk surface. No EPSS score, KEV listing, or public POC was provided; the absence of KEV/EPSS data means widespread active exploitation cannot be confirmed, but the low technical bar warrants prompt patching for any exposed deployment. |
| Exploit ScenarioDerived | An attacker locates an internet- or LAN-exposed ComfyUI instance and sends an unauthenticated POST /upload/image request carrying a malicious shard_*.pkl whose pickle __reduce__ payload runs os.system with attacker commands. They then POST /prompt with a workflow graph referencing the uploaded file through the LoadTrainingDataset node; when torch.load deserializes it, arbitrary code executes as the ComfyUI process user. No public POC is identified, but the pickle __reduce__ technique is trivial and reliable to construct. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jul 31, 2026
Remote code execution in ComfyUI v0.23.0 (and all prior 0.x releases) lets unauthenticated attackers run arbitrary Python by abandoning the LoadTrainingDataset node to torch.load a malicious pickle. Because the upload and prompt-queue endpoints require no authentication, an attacker who can reach the web interface can upload a crafted shard_*.pkl file and trigger deserialization to execute commands as the ComfyUI process user. VulnCheck reported the flaw and a vendor fix exists; there is no public exploit identified at time of analysis, though the technique (pickle __reduce__ abuse) is trivial to reproduce.
RemediationAI
Apply the vendor fix from PR #14543 / commit 94ee49b1612824366a8631ea069b2a1fa5c73720 (https://github.com/Comfy-Org/ComfyUI/pull/14543), which changes torch.load to use weights_only=True; upgrade to a build that includes this commit past 0.23.0 - an exact tagged patched release version is not independently confirmed from the provided data, so verify the running build contains the commit. As compensating controls where immediate patching is not possible: do not expose the ComfyUI web server (default port 8188) to untrusted networks - bind it to localhost or place it behind an authenticating reverse proxy or VPN, since the /upload/image and /prompt endpoints are unauthenticated by design; block or restrict access to the /upload/image endpoint at the proxy to prevent attacker-controlled .pkl uploads, accepting that this may break legitimate dataset-upload workflows; and avoid running ComfyUI as a privileged user to limit blast radius, noting this does not prevent code execution, only reduces post-exploitation impact.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-502 (Deserialization of Untrusted Data). ComfyUI's dataset loading node (comfy_extras/nodes_dataset.py) called PyTorch's torch.load() on user-supplied .pkl shard files. torch.load defaults to Python's pickle module, which invokes an object's __reduce__ method during unpickling - allowing an attacker to embed a callable such as os.system that runs at load time. The affected component is the comfy-org:comfyui application (cpe:2.3:a:comfy-org:comfyui:*), a widely used node-graph front-end for Stable Diffusion and other generative-AI models. The vendor fix (PR #14543, commit 94ee49b) hardens the call to torch.load(f, weights_only=True), which restricts unpickling to tensor/weight primitives and blocks arbitrary object reconstruction.
Know when Comfyui gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Unauthenticated network-reachable endpoints (PR:N, AV:N) with a trivially crafted pickle (AC:L) yield full RCE as the process user, giving C:H/I:H/A:H and S:U.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Articles & Coverage 2
Executive ViewAI
ComfyUI v0.23.0 and all earlier versions are vulnerable to unauthenticated remote code execution (CVSS 9.3), allowing attackers to seize complete control of affected systems without authentication. Organizations running this AI/ML tool face risk of data exfiltration, lateral movement, and operational disruption through arbitrary command execution. The exploit technique is trivial to reproduce, making immediate patching critical to operational security.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Arbitrary file write via path traversal in ComfyUI before 0.30.0 lets an attacker place attacker-controlled content anyw
comfyanonymous/comfyui version v0.2.4 suffers from a non-blind Server-Side Request Forgery (SSRF) vulnerability. Rated h
A stored cross-site scripting (XSS) vulnerability exists in comfyanonymous/comfyui version 0.2.2 and possibly earlier. R
Stored cross-site scripting in ComfyUI (Comfy-Org) before 0.28.0 lets an attacker upload HTML or SVG to the per-user use
Stored cross-site scripting in ComfyUI before 0.28.0 lets an attacker upload a malicious SVG that the /view endpoint ser
Unauthenticated information disclosure in ComfyUI (comfy-org/comfyui) before 0.28.0 lets remote attackers read arbitrary
Path traversal arbitrary file read in ComfyUI (comfy-org) before 0.28.0 lets remote unauthenticated attackers probe arbi
Path traversal in ComfyUI up to version 0.13.0 allows authenticated remote attackers to read arbitrary files on the serv
Path traversal in ComfyUI up to version 0.13.0 allows authenticated remote attackers to read arbitrary files via manipul
Cross-site request forgery (CSRF) in ComfyUI up to version 0.13.0 allows unauthenticated remote attackers to modify appl
Cross-site scripting (XSS) in ComfyUI up to version 0.13.0 allows authenticated remote attackers to inject malicious scr
Stored cross-site scripting (XSS) in ComfyUI's userdata endpoint (getuserdata function in app/user_manager.py) allows au
EUVD-2026-51652
GHSA-6p72-9j26-4rmx
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB