Vulnerabilities in pkg:pypi/InvokeAI

PACKAGE
Advisory Identifier: GHSA-mcrp-whpw-jp68
Advisory Summary

CVE-2024-12029 is a CRITICAL (CVSS 9.8) invokeai deserialization of untrusted data vulnerability (CWE-502: Deserialization of Untrusted Data) affecting InvokeAI libraries in the PyPI ecosystem. The issue involves invokeai deserialization of untrusted data vulnerability. Remediation is available by upgrading affected packages to version 5.4.3rc2.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/InvokeAI

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/InvokeAI. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mcrp-whpw-jp68 CVE-2024-12029 CRITICAL InvokeAI Deserialization of Untrusted Data vulnerability
GHSA-227r-w5j2-6243 CVE-2024-11042 CRITICAL InvokeAI Arbitrary File Deletion vulnerability
GHSA-ffh5-w482-c7m5 CVE-2024-11043 HIGH InvokeAI Uncontrolled Resource Consumption vulnerability
GHSA-6f6x-f56q-5xgv CVE-2024-10821 HIGH InvokeAI has Denial of Service (DoS) vulnerability in `/api/v1/images/upload`

CVE-2024-12029 at a Glance

CVE Identifier CVE-2024-12029
GHSA Identifier GHSA-mcrp-whpw-jp68
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-502: Deserialization of Untrusted Data
Affected Product InvokeAI
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.8

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:H/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 High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2024-12029

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.4.3rc2
pip install InvokeAI>=5.4.3rc2
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-12029, 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.4.3rc2), 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-502: Deserialization of Untrusted Data, where the product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid. 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

A remote code execution vulnerability exists in invoke-ai/invokeai versions 5.3.1 through 5.4.2 via the /api/v2/models/install API. The vulnerability arises from unsafe deserialization of model files using torch.load without proper validation. Attackers can exploit this by embedding malicious code in model files, which is executed upon loading. This issue is fixed in version 5.4.3rc2.

CVE-2024-12029 Affected InvokeAI Versions

1 component(s)
Fixed Versions:
5.4.3rc2
Product / Package Ecosystem Affected Versions Fixed Version
InvokeAI
PyPI
≥ 5.3.1
< 5.4.3rc2
5.4.3rc2

References

Frequently Asked Questions

What is CVE-2024-12029?
CVE-2024-12029 is a security vulnerability in InvokeAI involving InvokeAI Deserialization of Untrusted Data vulnerability under CWE-502: Deserialization of Untrusted Data.
Which InvokeAI versions are affected?
Affected versions include releases prior to 5.4.3rc2 across affected packages: InvokeAI.
What version fixes CVE-2024-12029?
Upgrading to 5.4.3rc2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is InvokeAI affected?
Yes, InvokeAI is affected in releases prior to 5.4.3rc2. Upgrade your dependency to 5.4.3rc2 or later.
What is the CVSS score of CVE-2024-12029?
CVE-2024-12029 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2024-12029?
CVE-2024-12029 is classified under CWE-502: Deserialization of Untrusted Data (The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.).
How can I check PyPI dependencies for CVE-2024-12029?
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-mcrp-whpw-jp68",
  "modified" : "2025-05-20T17:37:16Z",
  "published" : "2025-03-21T15:32:15Z",
  "aliases" : [ "CVE-2024-12029" ],
  "summary" : "InvokeAI Deserialization of Untrusted Data vulnerability",
  "details" : "A remote code execution vulnerability exists in invoke-ai/invokeai versions 5.3.1 through 5.4.2 via the /api/v2/models/install API. The vulnerability arises from unsafe deserialization of model files using torch.load without proper validation. Attackers can exploit this by embedding malicious code in model files, which is executed upon loading. This issue is fixed in version 5.4.3rc2.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "InvokeAI"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.3.1"
      }, {
        "fixed" : "5.4.3rc2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-12029"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/invoke-ai/InvokeAI/commit/ed46acee79460189b38c164321b14bdfbf3073c9"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/invoke-ai/invokeai/commit/756008dc5899081c5aa51e5bd8f24c1b3975a59e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/invoke-ai/InvokeAI"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/invokeai/PYSEC-2025-9.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://huntr.com/bounties/9b790f94-1b1b-4071-bc27-78445d1a87a3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-502" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-21T15:32:15Z",
    "nvd_published_at" : "2025-03-20T10:15:26Z"
  }
}