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.

Severity (CVSS 3.0)9.8Critical
Exploit odds (30 days)6.0%top 6.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling2Metasploit, Public PoC

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

EcosystemPackageFixed inAdvisory
PyPIinvokeai5.4.3rc2GHSA-mcrp-whpw-jp68
PyPIinvokeai5.4.3rc1PYSEC-2025-9

Affected products (as reported)

VendorProductVersions
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

References