Vulnerability · Published Mar 20, 2025 · Assigned by @huntr_ai
CVE-2024-12029Remote Code Execution via Model Deserialization in invoke-ai/invokeai
Critical 9.8
In plain English
A critical-severity unsafe deserialization in invoke-ai/invokeai from invoke-ai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 6.0% (higher than 93% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, public proof-of-concept code. Fixed versions are available - upgrade the affected package.
Official description
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | invokeai | 5.4.3rc2 | GHSA-mcrp-whpw-jp68 |
| PyPI | invokeai | 5.4.3rc1 | PYSEC-2025-9 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| invoke-ai | invoke-ai/invokeai | unspecified – before 5.4.3 |
Weakness: CWE-502 · Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H