# CVE-2024-12029: InvokeAI Deserialization of Untrusted Data vulnerability

Source: https://junglewise.ai/threats/cve-2024-12029-invokeai-deserialization-of-untrusted-data-vulnerability  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2025-03-20  
License: CC BY 4.0 with a link back

CVE-2024-12029 · Severity: low · CVSS 3 · Published 2025-03-20

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.3.

Technologies: [invokeai (PyPI)](https://junglewise.ai/threats/technologies/pypi-invokeai). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2024-12029 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2024-12029 being exploited in the wild.

**How severe is CVE-2024-12029?** Low severity, with a CVSS score of 3, published 20 March 2025.

**Which products and versions are affected?** invokeai (PyPI) ECOSYSTEM:introduced=5.3.1,fixed=5.4.3rc2, GIT:introduced=0,fixed=756008dc5899081c5aa51e5bd8f24c1b3975a59e|ECOSYSTEM:introduced=5.3.1,fixed=5.4.3rc1.

**Is there a fix for CVE-2024-12029?** Yes. invokeai (PyPI): upgrade to 5.4.3rc1, 5.4.3rc2 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**Am I affected by CVE-2024-12029?** Check whether you run invokeai (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- invokeai (PyPI): upgrade to 5.4.3rc1, 5.4.3rc2 or later

  ```sh
  pip install "invokeai>=5.4.3rc2"
  ```


## Affected products

- invokeai (PyPI) ECOSYSTEM:introduced=5.3.1,fixed=5.4.3rc2, GIT:introduced=0,fixed=756008dc5899081c5aa51e5bd8f24c1b3975a59e|ECOSYSTEM:introduced=5.3.1,fixed=5.4.3rc1

## Identifiers

- CVE-2024-12029
- GHSA-mcrp-whpw-jp68
- PYSEC-2025-9

## Related threats

- [PYSEC-2026-1467 - InvokeAI Uncontrolled Resource Consumption vulnerability](https://junglewise.ai/threats/cve-2024-11043-invokeai-uncontrolled-resource-consumption-vulnerability)
- [PYSEC-2026-1466 - InvokeAI has Denial of Service (DoS) vulnerability in `/api/v1/images/upload`](https://junglewise.ai/threats/cve-2024-10821-invokeai-has-denial-of-service-dos-vulnerability-in-api-v1-images)
- [InvokeAI has External Control of File Name or Path](https://junglewise.ai/threats/cve-2025-6237-invokeai-has-external-control-of-file-name-or-path)
- [InvokeAI Arbitrary File Deletion vulnerability](https://junglewise.ai/threats/cve-2024-11042-invokeai-arbitrary-file-deletion-via-directory-traversal)
