CVE-2024-12029
CRITICALVulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A08:2025 - Software or Data Integrity Failures
ASVS 5.0
V1 - Encoding and Sanitization Safe deserialization, type allowlists
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Impact | CVSS 9.8, EPSS 49.1%. InvokeAI is a popular open-source Stable Diffusion interface running on GPU servers. These systems often have expensive GPU resources, access to proprietary training data, and cloud credentials. Model poisoning via pickle deserialization is a well-known AI/ML supply chain attack vector. |
| Exploit ScenarioDerived | An attacker publishes a trojanized model file on a model sharing platform (HuggingFace, CivitAI). An InvokeAI user installs the model through the API. During loading, the embedded pickle code executes a reverse shell. The attacker gains access to the GPU server, steals other models and training data, and deploys a cryptominer on the GPU. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Mar 28, 2026
InvokeAI image generation platform versions 5.3.1 through 5.4.2 contain a remote code execution vulnerability via unsafe deserialization when loading AI models. Attackers can embed malicious code in model files that execute when loaded through the /api/v2/models/install API endpoint.
Earlier versions of this analysis (1)
RCE in InvokeAI via unsafe torch.load deserialization when installing AI models allows arbitrary code execution on GPU servers.
RemediationAI
Update InvokeAI beyond 5.4.2. Only load models from trusted sources. Use torch.load with weights_only=True when available. Run InvokeAI in a sandboxed environment with restricted network access.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
InvokeAI uses torch.load() to deserialize model files without safety restrictions. An attacker can craft a malicious model file with embedded Python code in the pickle stream that executes during deserialization. The /api/v2/models/install API endpoint triggers the model loading, executing the payload on the server.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Primary rating from NVD · only source for this CVE.
CVSS VectorNVD
Lifecycle Timeline
2DescriptionCVE.org
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.
Executive ViewAI
Organizations using invoke-ai/invokeai face critical risk from CVE-2024-12029, a insecure deserialization vulnerability rated CVSS 9.8. Insecure deserialization could allow attackers to execute arbitrary code by providing crafted serialized data. With an EPSS score of 49%, exploitation is likely in exposed deployments. Organizations should apply vendor updates immediately when available and implement compensating controls in the interim.
Apply vendor patch. If immediate patching is not feasible: (1) Restrict deserialization endpoints; (2) Implement integrity checks on serialized data; (3) Use type-safe alternatives.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Insecure deserialization occurs when an application converts serialized data (a stream of bytes representing an object's state) back into a living object without proper validation.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
NVD
CVE.org
EPSS
GitHub
Exploit-DB