CVE-2024-12029
CRITICALCVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Lifecycle Timeline
3Tags
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.
Analysis
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.
Technical Context
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.
Affected Products
['InvokeAI 5.3.1 through 5.4.2']
Remediation
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.
Priority Score
Share
External POC / Exploit Code
Leaving vuln.today