Skip to content
OpenAdvisories
Critical · 9.8 Public exploit CVE-2024-12029 EUVD-2025-7245GHSA-mcrp-whpw-jp68PYSEC-2025-9

Remote Code Execution via Model Deserialization in invoke-ai/invokeai

Published Mar 20, 2025 · Updated Mar 20, 2025 · Assigned by @huntr_ai

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 products

VendorProductAffectedFixed
invoke-ai invoke-ai/invokeai unspecified – < 5.4.3 5.4.3

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

Metasploit 1 module

  • InvokeAI RCE
    exploit/linux/http/invokeai_rce_cve_2024_12029

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
PyPI invokeai >= 5.3.1, < 5.4.3rc2 5.4.3rc2 GHSA-mcrp-whpw-jp68
PyPI invokeai >= 5.3.1, < 5.4.3rc1 5.4.3rc1 PYSEC-2025-9

References