{"answers":{"affected":"3 open source packages ship an affected version, including invokeai and InvokeAI.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-12029 exists.","fix":"Upgrade invokeai to a fixed version for your release line: 5.4.3rc1 or 5.4.3rc2.","what":"CVE-2024-12029 is a critical unsafe deserialization vulnerability in invoke-ai/invokeai, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-12029 and fix it if it is affected.\n\nWhat it is: CVE-2024-12029 is a critical unsafe deserialization vulnerability in invoke-ai/invokeai, published on 20 Mar 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-12029 exists.\n\nAffected packages and fixed versions:\n- invokeai (PyPI): affected from 5.3.1; fixed in 5.4.3rc1\n- invokeai (PyPI): affected from 5.3.1; fixed in 5.4.3rc2\n- InvokeAI (PyPI): affected from 5.3.1; fixed in 5.4.3rc2\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-12029/ (Markdown: https://insights.sbomify.com/CVE-2024-12029/index.md)","id":"CVE-2024-12029","markdown":"https://insights.sbomify.com/CVE-2024-12029/index.md","name":"CVE-2024-12029","record":{"aliases":["GHSA-mcrp-whpw-jp68","PYSEC-2025-9"],"analysis":{"component_type":"web_application","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"AI image generation app","requires_auth":"none","summary":"Attackers can execute arbitrary code by uploading malicious model files to the InvokeAI API due to unsafe deserialization.","user_interaction":"not_required","vuln_class":"deserialization"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"@huntr_ai","cpe":[],"cvss":{"score":9.8,"severity":"critical","source":"cna","vector":"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","version":"3.0"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":"2025-02-07","github_poc":1,"max_poc_stars":0,"metasploit":1,"nuclei":0,"refs":[{"date":"2025-02-07","kind":"metasploit","ref":"exploit/linux/http/invokeai_rce_cve_2024_12029","stars":null,"title":"InvokeAI RCE"},{"date":"2026-04-15T20:41:30Z","kind":"github_poc","ref":"https://github.com/Lu3ky13/Alternative-Approach-Reverse-Shell-Callback-Test-InvokeAI-RCE","stars":0,"title":"This repository contains alternative payload approaches for the InvokeAI RCE vulnerability (CVE-2024-12029) when SSH key injection fails. The payloads are designed to test if pickle deserialization is actually occurring and provide alternative access methods."}],"tier":"weaponised"},"has_fix":true,"headline":"Remote Code Execution via Model Deserialization in invoke-ai/invokeai","id":"CVE-2024-12029","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"deserialization","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"MDTF – Meta Data and Taxonomies Filter \u003c= 1.3.3.5 - Authenticated (Contributor+) SQL Injection","id":"CVE-2024-12030"},"packages":[{"ecosystem":"PyPI","fixed":["5.4.3rc2"],"introduced":["5.3.1"],"last_affected":[],"package":"InvokeAI","purl":null,"source":"GHSA-mcrp-whpw-jp68"},{"ecosystem":"PyPI","fixed":["5.4.3rc1"],"introduced":["5.3.1"],"last_affected":[],"package":"invokeai","purl":"pkg:pypi/invokeai","source":"PYSEC-2025-9"},{"ecosystem":"PyPI","fixed":["5.4.3rc2"],"introduced":["5.3.1"],"last_affected":[],"package":"invokeai","purl":"pkg:pypi/invokeai","source":"GHSA-mcrp-whpw-jp68"}],"prev":{"headline":"Friends \u003c= 3.2.1 - Missing Authorization","id":"CVE-2024-12028"},"products":["invoke-ai/invokeai"],"published":"2025-03-20","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"attribution","licence":"BSD-3-Clause","name":"Metasploit"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-03-20","vendors":["invoke-ai"]},"summary":"Attackers can execute arbitrary code by uploading malicious model files to the InvokeAI API due to unsafe deserialization.","url":"https://insights.sbomify.com/CVE-2024-12029/"}