CVE-2024-11042: InvokeAI InvokeAI Arbitrary File Deletion Vulnerability Vulnerability

CRITICAL
Advisory Identifier: GHSA-227r-w5j2-6243
CVSS 9.1
CWE-20 CWE-73 CWE-22
Published
Advisory Summary

CVE-2024-11042 is a CRITICAL (CVSS 9.1) invokeai arbitrary file deletion vulnerability vulnerability (CWE-20: Improper Input Validation) affecting InvokeAI libraries in the PyPI ecosystem. The issue involves invokeai arbitrary file deletion vulnerability. Remediation is available by upgrading affected packages to version 5.3.0rc1.

CVE-2024-11042 at a Glance

CVE Identifier CVE-2024-11042
GHSA Identifier GHSA-227r-w5j2-6243
Severity CRITICAL
CVSS v3.1 Base Score 9.1
CWE Classification CWE-20: Improper Input Validation
Affected Product InvokeAI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-11042

To remediate this vulnerability, upgrade all affected InvokeAI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

InvokeAI fixed: 5.3.0rc1
pip install InvokeAI>=5.3.0rc1
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show InvokeAI

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2024-11042, inspect your installed packages using pip:

pip show InvokeAI

Analyze the terminal output to locate any version of InvokeAI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.3.0rc1), your application is affected.

Note: The pip show InvokeAI command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In InvokeAI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

In invoke-ai/invokeai version v5.0.2, the web API `POST /api/v1/images/delete` is vulnerable to Arbitrary File Deletion. This vulnerability allows unauthorized attackers to delete arbitrary files on the server, potentially including critical or sensitive system files such as SSH keys, SQLite databases, and configuration files. This can impact the integrity and availability of applications relying on these files.

CVE-2024-11042 Affected InvokeAI Versions

1 component(s)
Fixed Versions:
5.3.0rc1
Product / Package Ecosystem Affected Versions Fixed Version
InvokeAI
PyPI
< 5.3.0rc1
5.3.0rc1

References

Frequently Asked Questions

What is CVE-2024-11042?
CVE-2024-11042 is a security vulnerability in InvokeAI involving InvokeAI Arbitrary File Deletion vulnerability under CWE-20: Improper Input Validation.
Which InvokeAI versions are affected?
Affected versions include releases prior to 5.3.0rc1 across affected packages: InvokeAI.
What version fixes CVE-2024-11042?
Upgrading to 5.3.0rc1 (or the latest patched release for your respective branch) resolves the vulnerability.
Is InvokeAI affected?
Yes, InvokeAI is affected in releases prior to 5.3.0rc1. Upgrade your dependency to 5.3.0rc1 or later.
What is the CVSS score of CVE-2024-11042?
CVE-2024-11042 has a CVSS v3.1 base score of 9.1 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H.
What CWE is associated with CVE-2024-11042?
CVE-2024-11042 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check PyPI dependencies for CVE-2024-11042?
Run the dependency tree command: 'pip show InvokeAI'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-227r-w5j2-6243",
  "modified" : "2025-03-21T16:32:50Z",
  "published" : "2025-03-20T12:32:41Z",
  "aliases" : [ "CVE-2024-11042" ],
  "summary" : "InvokeAI Arbitrary File Deletion vulnerability",
  "details" : "In invoke-ai/invokeai version v5.0.2, the web API `POST /api/v1/images/delete` is vulnerable to Arbitrary File Deletion. This vulnerability allows unauthorized attackers to delete arbitrary files on the server, potentially including critical or sensitive system files such as SSH keys, SQLite databases, and configuration files. This can impact the integrity and availability of applications relying on these files.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "InvokeAI"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "5.3.0rc1"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-11042"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/invoke-ai/invokeai/commit/5440c037674882b2ab7acd59087e9bb04b49657a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/invoke-ai/InvokeAI"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/635535a7-c804-4789-ac3a-48d951263987"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20", "CWE-22", "CWE-73" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-21T16:32:50Z",
    "nvd_published_at" : "2025-03-20T10:15:23Z"
  }
}