CVE-2024-12029
JSON

9.8critical

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

Severity
9.8critical CVSS:3.0 by @huntr_ai
Exploit likelihood
5.98% (higher than 93% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
@huntr_ai
Also known as
GHSA-mcrp-whpw-jp68PYSEC-2025-9

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

Product or packageVersionsReported by
invoke-ai invoke-ai/invokeaifrom unspecified before 5.4.3CVE List
invokeai (PyPI)from 5.3.1 before 5.4.3rc2, before 756008dc5899081c5aa51e5bd8f24c1b3975a59e, from 5.3.1 before 5.4.3rc1GitHub Advisory Database, PyPA Advisory Database

All scores

@huntr_ai9.8critical CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub9.8critical CVSS:3.0CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-502

SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

Existe una vulnerabilidad de ejecución remota de código en las versiones 5.3.1 a 5.4.2 de evolve-ai/invokeai a través de la API /api/v2/models/install. Esta vulnerabilidad surge de la deserialización insegura de archivos de modelo mediante torch.load sin la validación adecuada. Los atacantes pueden explotarla incrustando código malicioso en los archivos de modelo, que se ejecuta al cargarlos. Este problema se ha corregido en la versión 5.4.3.

References

Sources

SourceRecordLicence
CVE ListCVE-2024-12029 changed 2025-03-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-mcrp-whpw-jp68 changed 2025-05-20CC-BY-4.0
NVDCVE-2024-12029 changed 2026-06-17Public domain
PyPA Advisory DatabasePYSEC-2025-9 changed 2026-06-10CC-BY-4.0