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 package | Versions | Reported by |
|---|---|---|
| invoke-ai invoke-ai/invokeai | from unspecified before 5.4.3 | CVE List |
| invokeai (PyPI) | from 5.3.1 before 5.4.3rc2, before 756008dc5899081c5aa51e5bd8f24c1b3975a59e, from 5.3.1 before 5.4.3rc1 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| @huntr_ai | 9.8critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 9.8critical CVSS:3.0 | CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
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
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-12029 changed 2025-03-20 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-mcrp-whpw-jp68 changed 2025-05-20 | CC-BY-4.0 |
| NVD | CVE-2024-12029 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2025-9 changed 2026-06-10 | CC-BY-4.0 |