The SentinelOne Annual Threat Report - A Defenders Guide from the FrontlinesThe SentinelOne Annual Threat ReportGet the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-21577

CVE-2024-21577: ComfyUI-Ace-Nodes RCE Vulnerability

CVE-2024-21577 is a remote code execution vulnerability in ComfyUI-Ace-Nodes caused by unsafe eval() usage in ACE_ExpressionEval node. This article covers the technical details, affected versions, impact, and mitigation.

Published: April 15, 2026

CVE-2024-21577 Overview

CVE-2024-21577 is a critical code injection vulnerability affecting ComfyUI-Ace-Nodes, a custom node extension for the ComfyUI AI image generation platform. The vulnerability exists in the ACE_ExpressionEval node, which contains an unsafe eval() function call in its entrypoint that accepts arbitrary user-controlled data. An attacker can craft a malicious workflow that results in executing arbitrary code on the server hosting the ComfyUI instance.

Critical Impact

This vulnerability allows unauthenticated remote attackers to execute arbitrary code on affected servers through specially crafted workflows, potentially leading to complete system compromise, data theft, and lateral movement within the network.

Affected Products

  • ComfyUI-Ace-Nodes (all versions with the vulnerable ACE_ExpressionEval node)
  • ComfyUI installations with ComfyUI-Ace-Nodes plugin enabled

Discovery Timeline

  • 2024-12-13 - CVE-2024-21577 published to NVD
  • 2024-12-13 - Last updated in NVD database

Technical Details for CVE-2024-21577

Vulnerability Analysis

This vulnerability is classified under CWE-94 (Improper Control of Generation of Code - Code Injection). The ACE_ExpressionEval node in ComfyUI-Ace-Nodes provides expression evaluation functionality that directly passes user-controlled input to Python's eval() function without proper sanitization or sandboxing. This represents a fundamental secure coding violation, as eval() should never be used with untrusted input.

The vulnerable code is located in the nodes.py file at line 1193 of the ComfyUI_AceNodes repository. When a user creates or loads a workflow containing the ACE_ExpressionEval node, any expression provided as input is executed directly in the Python interpreter context with full server-side privileges.

Root Cause

The root cause of this vulnerability is the direct use of Python's eval() function on user-supplied input without any input validation, sanitization, or execution sandboxing. The eval() function is inherently dangerous as it can execute arbitrary Python code, including system commands, file operations, and network communications. The developer did not implement any protective measures such as:

  • Input validation or allowlisting of permitted expressions
  • Abstract Syntax Tree (AST) parsing with restricted node types
  • Sandboxed execution environments
  • Principle of least privilege for the execution context

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this vulnerability by:

  1. Creating a malicious ComfyUI workflow that includes the ACE_ExpressionEval node
  2. Injecting arbitrary Python code as the expression parameter
  3. Submitting or sharing the workflow to be executed on a target ComfyUI server

The vulnerability exists in the entrypoint function of the ACE_ExpressionEval node. When the workflow is processed, the malicious expression is passed directly to eval(), resulting in arbitrary code execution with the privileges of the ComfyUI server process.

Exploitation could include importing system modules like os or subprocess to execute shell commands, reading sensitive files, establishing reverse shells, or pivoting to other systems on the network. For technical details, see the vulnerable code in the GitHub repository.

Detection Methods for CVE-2024-21577

Indicators of Compromise

  • Unexpected outbound network connections from the ComfyUI server process
  • Suspicious child processes spawned by the Python interpreter running ComfyUI
  • Unusual file system access patterns, particularly reads of sensitive configuration files or writes to system directories
  • Workflow files containing ACE_ExpressionEval nodes with complex or obfuscated expressions
  • Presence of imported system modules (os, subprocess, socket) in expression evaluation contexts

Detection Strategies

  • Monitor for the use of ACE_ExpressionEval nodes in workflow submissions, particularly those with expressions containing import, __, exec, or eval keywords
  • Implement process monitoring to detect child processes spawned by the ComfyUI application
  • Deploy network monitoring to identify anomalous outbound connections from ComfyUI server instances
  • Analyze workflow JSON files for suspicious patterns in expression fields before execution

Monitoring Recommendations

  • Enable comprehensive logging for all ComfyUI workflow executions and node evaluations
  • Deploy endpoint detection and response (EDR) solutions to monitor for code injection attack patterns
  • Implement application-level firewalls to restrict outbound connections from ComfyUI servers
  • Configure alerts for any process execution originating from the ComfyUI application context that attempts to access system utilities

How to Mitigate CVE-2024-21577

Immediate Actions Required

  • Disable or remove the ACE_ExpressionEval node from ComfyUI-Ace-Nodes installations immediately
  • Audit all existing workflows for the presence of ACE_ExpressionEval nodes and review their contents
  • Restrict network access to ComfyUI instances, limiting exposure to trusted users only
  • Consider running ComfyUI in a containerized or sandboxed environment with restricted permissions
  • Monitor for any vendor patches or security updates to ComfyUI-Ace-Nodes

Patch Information

At the time of publication, no official patch has been released for this vulnerability. Users should monitor the ComfyUI_AceNodes GitHub repository for security updates. Until a patch is available, the recommended approach is to completely disable or remove the vulnerable ACE_ExpressionEval node.

Workarounds

  • Remove or comment out the ACE_ExpressionEval node class from the nodes.py file
  • Implement network segmentation to isolate ComfyUI servers from critical infrastructure
  • Deploy web application firewalls (WAF) to filter potentially malicious workflow submissions
  • Run ComfyUI with minimal system privileges using a dedicated service account with restricted filesystem and network access
  • If expression evaluation is required, consider implementing a custom solution using Python's ast.literal_eval() for safe evaluation of literal expressions only
bash
# Configuration example - Disable ACE_ExpressionEval node
# Navigate to ComfyUI-Ace-Nodes installation directory
cd /path/to/ComfyUI/custom_nodes/ComfyUI_AceNodes

# Backup and modify nodes.py to disable the vulnerable node
cp nodes.py nodes.py.backup

# Comment out or remove the ACE_ExpressionEval class registration
# Alternatively, remove the entire plugin if not needed
rm -rf /path/to/ComfyUI/custom_nodes/ComfyUI_AceNodes

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeRCE

  • Vendor/TechComfyui

  • SeverityCRITICAL

  • CVSS Score10.0

  • EPSS Probability0.16%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-94
  • Technical References
  • GitHub PoC Code Snippet
  • Related CVEs
  • CVE-2024-21576: ComfyUI-Bmad-Nodes RCE Vulnerability

  • CVE-2026-6592: ComfyUI XSS Vulnerability

  • CVE-2026-6590: ComfyUI Path Traversal Vulnerability

  • CVE-2026-6593: ComfyUI XSS Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English