INCIDENT MAP

Browse / Unsafe Model Loading and Supply Chain / CVE-2024-12029

InvokeAI Deserialization of Untrusted Data vulnerability

CVE-2024-12029 ยท 2025-03-21 critical

Class
Unsafe Model Loading and Supply Chain (filed by a model that read the advisory)
Technique
Code and command execution
Affected
invokeai (PyPI)
CVSS
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
6.0% chance of exploitation in 30 days

How it works, in short

Installing a model file through the API makes InvokeAI call torch.load on it, so a malicious checkpoint runs code when loaded. (Our summary, written by a model. The source text is below.)

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.