Horizon Alert
Summary of the vulnerability and why it matters
A vulnerability has been identified in ComfyUI that could allow unauthenticated remote attackers to execute arbitrary Python code. This occurs through a feature designed for loading training datasets, where uploading a specially crafted file can lead to the execution of malicious commands. The main concern is to determine if this technology is in use and exposed within our environment.
- Unsafe code execution via data loading.
- Confirms potential for remote command execution.
- Assess relevance and exposure of ComfyUI.
Attack Path
How an attacker could exploit the issue
An attacker can remotely execute arbitrary Python code by uploading a specially crafted file and tricking the system into loading it. This process begins with an unauthenticated user uploading a malicious pickle file disguised as a training dataset shard. The attacker then triggers a workflow that processes this file, leading to the deserialization of the malicious payload and subsequent arbitrary code execution as the user running the ComfyUI application.
- Unauthenticated remote access required.
- Uploading crafted pickle file triggers vulnerability.
- Risk of arbitrary code execution.
Live Threat
Current exploitation, exposure, and threat context
When ComfyUI is configured to be accessible over a network, an unauthenticated attacker could execute arbitrary Python code by uploading a malicious pickle file and triggering its deserialization through the LoadTrainingDataset node. This could lead to the compromise of the ComfyUI process, affecting system data.
- Arbitrary code execution.
- Unauthenticated network upload and execution.
- Compromise of ComfyUI process.
Operational Fix
Recommended remediation, mitigation, and detection steps
This vulnerability in ComfyUI's LoadTrainingDataset node requires immediate attention from teams managing the application and its underlying infrastructure. The first practical step is to inventory all instances of ComfyUI, determine their reachability and business criticality, and identify the specific teams or individuals accountable for these assets before planning remediation.
- Application owners must own the issue.
- Verify ComfyUI instance reachability and criticality.
- Plan remediation based on identified risk.