Skip to main content

ComfyUI CVE-2026-68771

| EUVDEUVD-2026-51652 CRITICAL
Deserialization of Untrusted Data (CWE-502)
2026-07-31 VulnCheck GHSA-6p72-9j26-4rmx
9.3
CVSS 4.0 · Vendor: VulnCheck
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Reach exposed ComfyUI API
  2. Delivery
    Upload malicious shard_*.pkl via POST /upload/image
  3. Exploit
    Queue workflow referencing file via POST /prompt
  4. Execution
    LoadTrainingDataset calls torch.load on pickle
  5. Persist
    __reduce__ executes payload
  6. Impact
    Arbitrary 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.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

comfyui 0 ≤0.23.0

Affected Packages

euvd comfyui no fix

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

Vendor (VulnCheck) PRIMARY 9.3 CRITICAL
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
vuln.today AI 9.8 CRITICAL

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.

3.1 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
4.0 AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (VulnCheck).

CVSS VectorVendor: VulnCheck

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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.

Executive ViewAI

Why It Matters

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.

Business Impact: Severe
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 54% exploitable
Prevalence
Medium
very popular generative-AI workflow tool, limited footprint outside ML users
Social Media
3
Sightings
Data Quality
7 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment CIRCL GitHub VulDB

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.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

47
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +46
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

CVE-2026-92816 HIGH POC
8.5 Sep 16

Arbitrary file write via path traversal in ComfyUI before 0.30.0 lets an attacker place attacker-controlled content anyw

CVE-2024-12882 HIGH POC
7.5 Mar 20

comfyanonymous/comfyui version v0.2.4 suffers from a non-blind Server-Side Request Forgery (SSRF) vulnerability. Rated h

CVE-2024-10099 MEDIUM POC
6.1 Oct 17

A stored cross-site scripting (XSS) vulnerability exists in comfyanonymous/comfyui version 0.2.2 and possibly earlier. R

CVE-2026-56672 HIGH
8.2 Jul 31

Stored cross-site scripting in ComfyUI (Comfy-Org) before 0.28.0 lets an attacker upload HTML or SVG to the per-user use

CVE-2026-56670 HIGH
8.2 Jul 31

Stored cross-site scripting in ComfyUI before 0.28.0 lets an attacker upload a malicious SVG that the /view endpoint ser

CVE-2026-56671 HIGH
7.5 Jul 31

Unauthenticated information disclosure in ComfyUI (comfy-org/comfyui) before 0.28.0 lets remote attackers read arbitrary

CVE-2026-56673 HIGH
7.5 Jul 31

Path traversal arbitrary file read in ComfyUI (comfy-org) before 0.28.0 lets remote unauthenticated attackers probe arbi

CVE-2026-6591 LOW POC
2.1 Apr 20

Path traversal in ComfyUI up to version 0.13.0 allows authenticated remote attackers to read arbitrary files on the serv

CVE-2026-6590 LOW POC
2.1 Apr 20

Path traversal in ComfyUI up to version 0.13.0 allows authenticated remote attackers to read arbitrary files via manipul

CVE-2026-6589 LOW POC
2.1 Apr 20

Cross-site request forgery (CSRF) in ComfyUI up to version 0.13.0 allows unauthenticated remote attackers to modify appl

CVE-2026-6593 LOW POC
2.0 Apr 20

Cross-site scripting (XSS) in ComfyUI up to version 0.13.0 allows authenticated remote attackers to inject malicious scr

CVE-2026-6592 LOW POC
2.0 Apr 20

Stored cross-site scripting (XSS) in ComfyUI's userdata endpoint (getuserdata function in app/user_manager.py) allows au

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy