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-11042

CVE-2024-11042: InvokeAI Path Traversal Vulnerability

CVE-2024-11042 is a path traversal flaw in InvokeAI v5.0.2 allowing attackers to delete arbitrary files, including critical system files. This article covers the technical details, affected versions, and mitigation.

Published: April 15, 2026

CVE-2024-11042 Overview

A critical arbitrary file deletion vulnerability exists in invoke-ai/invokeai version v5.0.2 through its web API endpoint POST /api/v1/images/delete. This directory traversal vulnerability allows unauthorized attackers to delete arbitrary files on the server by manipulating image name parameters to escape the intended output directory. The vulnerability can be exploited to remove critical system files including SSH keys, SQLite databases, and configuration files, severely impacting the integrity and availability of applications dependent on these resources.

Critical Impact

Unauthenticated attackers can delete arbitrary files on InvokeAI servers, potentially destroying SSH keys, databases, and configuration files, leading to complete system compromise or denial of service.

Affected Products

  • InvokeAI v5.0.2
  • InvokeAI versions prior to the security patch at commit 5440c037674882b2ab7acd59087e9bb04b49657a

Discovery Timeline

  • 2025-03-20 - CVE CVE-2024-11042 published to NVD
  • 2025-10-15 - Last updated in NVD database

Technical Details for CVE-2024-11042

Vulnerability Analysis

This vulnerability stems from CWE-73 (External Control of File Name or Path), which occurs when an application uses user-controlled input to construct file paths without proper validation. In InvokeAI's implementation, the get_path function within image_files_disk.py directly concatenated user-supplied image names with the output folder path, allowing attackers to inject path traversal sequences (e.g., ../) to target files outside the intended directory.

The attack requires no authentication and can be executed over the network, making it particularly dangerous for publicly accessible InvokeAI installations. Successful exploitation enables attackers to delete any file the InvokeAI process has write permissions for, potentially leading to application crashes, data loss, or complete system compromise.

Root Cause

The root cause is insufficient input validation in the get_path method of the ImageFilesService class. The original implementation directly joined the user-supplied image_name parameter with the __output_folder path without sanitizing path traversal characters or verifying the resulting path remained within the intended directory boundary.

Attack Vector

An attacker can exploit this vulnerability by sending a malicious POST request to /api/v1/images/delete with a crafted image_name parameter containing directory traversal sequences. For example, an attacker could submit an image name like ../../../etc/important_config.conf to delete files outside the designated image storage directory. Since no authentication is required, any attacker with network access to the InvokeAI API can execute this attack.

python
# Security patch from invokeai/app/services/image_files/image_files_disk.py
# Source: https://github.com/invoke-ai/invokeai/commit/5440c037674882b2ab7acd59087e9bb04b49657a

         except Exception as e:
             raise ImageFileDeleteException from e
 
-    # TODO: make this a bit more flexible for e.g. cloud storage
     def get_path(self, image_name: str, thumbnail: bool = False) -> Path:
-        path = self.__output_folder / image_name
+        base_folder = self.__thumbnails_folder if thumbnail else self.__output_folder
+        filename = get_thumbnail_name(image_name) if thumbnail else image_name
 
-        if thumbnail:
-            thumbnail_name = get_thumbnail_name(image_name)
-            path = self.__thumbnails_folder / thumbnail_name
+        # Strip any path information from the filename
+        basename = Path(filename).name
+
+        if basename != filename:
+            raise ValueError("Invalid image name, potential directory traversal detected")
+
+        image_path = base_folder / basename
+
+        if not resolved_image_path.is_relative_to(resolved_base):
+            raise ValueError("Image path outside outputs folder, potential directory traversal detected")
 
-        return path
+        return resolved_image_path

The patch implements two critical safeguards: stripping path components from filenames and verifying the resolved path remains within the designated base folder using is_relative_to().

Detection Methods for CVE-2024-11042

Indicators of Compromise

  • Unexpected file deletions on systems running InvokeAI, particularly of configuration files, SSH keys, or databases
  • HTTP POST requests to /api/v1/images/delete containing path traversal sequences such as ../ or URL-encoded variants (%2e%2e%2f)
  • Application logs showing file deletion errors for paths outside the expected image output directories
  • Missing critical system files or configuration data following InvokeAI API activity

Detection Strategies

  • Implement web application firewall (WAF) rules to detect and block requests containing directory traversal patterns in the image name parameter
  • Monitor InvokeAI application logs for ValueError exceptions related to "potential directory traversal detected" (in patched versions)
  • Set up file integrity monitoring (FIM) on critical system files to detect unauthorized deletions
  • Analyze HTTP access logs for suspicious patterns in POST requests to /api/v1/images/delete

Monitoring Recommendations

  • Enable verbose logging for the InvokeAI API to capture all file deletion requests with their full parameters
  • Deploy intrusion detection systems (IDS) with signatures for path traversal attack patterns
  • Implement real-time alerting for any file system changes outside designated InvokeAI directories
  • Monitor for anomalous network traffic patterns indicating exploitation attempts

How to Mitigate CVE-2024-11042

Immediate Actions Required

  • Upgrade InvokeAI to a version containing the security fix at commit 5440c037674882b2ab7acd59087e9bb04b49657a or later
  • Restrict network access to the InvokeAI API to trusted IP addresses or internal networks only
  • Implement reverse proxy authentication in front of the InvokeAI API if public access is required
  • Audit file permissions to ensure the InvokeAI process runs with minimal required privileges

Patch Information

The vulnerability has been addressed in the official InvokeAI repository. The security fix is available in GitHub commit 5440c03767. The patch implements proper input sanitization by extracting only the basename from user-supplied filenames and validates that resolved paths remain within the authorized base folder using Python's Path.is_relative_to() method. Additional technical details are available in the Huntr bounty submission.

Workarounds

  • Deploy a reverse proxy (nginx, Apache) with ModSecurity or similar WAF to filter requests containing path traversal patterns before they reach InvokeAI
  • Restrict the InvokeAI service to listen only on localhost and require VPN or SSH tunnel access
  • Run InvokeAI in a containerized environment with limited filesystem access to minimize impact of exploitation
  • Implement network segmentation to isolate InvokeAI servers from critical infrastructure
bash
# Example nginx configuration to block path traversal attempts
location /api/v1/images/delete {
    # Block requests containing directory traversal patterns
    if ($request_body ~* "\.\.\/|\.\.\\|%2e%2e%2f|%2e%2e\/|\.\.%2f") {
        return 403;
    }
    
    # Restrict access to internal networks only
    allow 10.0.0.0/8;
    allow 192.168.0.0/16;
    deny all;
    
    proxy_pass http://127.0.0.1:9090;
}

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

  • Vulnerability Details
  • TypePath Traversal

  • Vendor/TechInvokeai

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.91%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-73
  • Technical References
  • GitHub Commit Overview

  • Huntr Bounty Submission
  • Related CVEs
  • CVE-2024-12029: InvokeAI RCE Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now 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