# CVE-2024-12029: Remote Code Execution via Model Deserialization in invoke-ai/invokeai

- Severity: Critical 9.8 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 5.98%, higher than 93% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2025-03-20T10:08:45.570Z
- Modified: 2026-06-17T06:58:55.060Z
- Also known as: GHSA-mcrp-whpw-jp68, PYSEC-2025-9
- Weaknesses: CWE-502
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- 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.

(As written by CVE List.)

## Affected

- invoke-ai invoke-ai/invokeai: from unspecified before 5.4.3
- invokeai (PyPI): from 5.3.1 before 5.4.3rc2; before 756008dc5899081c5aa51e5bd8f24c1b3975a59e; from 5.3.1 before 5.4.3rc1

## Every score

- @huntr_ai: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.0 9.8 Critical `CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://huntr.com/bounties/9b790f94-1b1b-4071-bc27-78445d1a87a3> (exploit, web)
- <https://github.com/invoke-ai/invokeai/commit/756008dc5899081c5aa51e5bd8f24c1b3975a59e> (fix, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-12029> (advisory)
- <https://github.com/invoke-ai/InvokeAI/commit/ed46acee79460189b38c164321b14bdfbf3073c9> (web)
- <https://github.com/invoke-ai/InvokeAI> (package)
- <https://github.com/pypa/advisory-database/tree/main/vulns/invokeai/PYSEC-2025-9.yaml> (web)
- <https://github.com/advisories/GHSA-mcrp-whpw-jp68> (advisory)

## Sources

- CVE List: [CVE-2024-12029](https://www.cve.org/CVERecord?id=CVE-2024-12029), CVE Terms of Use, modified 2025-03-20
- GitHub Advisory Database: [GHSA-mcrp-whpw-jp68](https://github.com/advisories/GHSA-mcrp-whpw-jp68), CC-BY-4.0, modified 2025-05-20
- NVD: [CVE-2024-12029](https://nvd.nist.gov/vuln/detail/CVE-2024-12029), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2025-9](https://osv.dev/vulnerability/PYSEC-2025-9), CC-BY-4.0, modified 2026-06-10

---

Page: https://cve.day/CVE-2024-12029 · Whole record: https://cve.day/CVE-2024-12029.json · Rebuilt by cve.day 2026-11-25T22:58:52.353Z
