CVE-2024-12029

CRITICAL

InvokeAI 5.3.1-5.4.2 - Remote Code Execution via Unsafe Model File Deserialization

Title source: llm
STIX 2.1

Exploitation Summary

EIP tracks 2 public exploits for CVE-2024-12029. PoCs published by Lu3ky13, jackfromeast, Takahiro Yokoyama, including Metasploit module exploits/linux/http/invokeai_rce_cve_2024_12029.

AI-analyzed exploit summary This repository contains functional exploit code for CVE-2024-12029, targeting InvokeAI's pickle deserialization vulnerability. It includes multiple payloads (reverse shells, callback tests) and a test script to verify exploitation.

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.

Exploits (2)

nomisec WORKING POC
by Lu3ky13 · poc
https://github.com/Lu3ky13/Alternative-Approach-Reverse-Shell-Callback-Test-InvokeAI-RCE

This repository contains functional exploit code for CVE-2024-12029, targeting InvokeAI's pickle deserialization vulnerability. It includes multiple payloads (reverse shells, callback tests) and a test script to verify exploitation.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: InvokeAI (version not specified)
No auth needed
Prerequisites: network access to target · ability to host payload files
devstral-2 · analyzed Apr 16, 2026 Full analysis →
metasploit WORKING POC EXCELLENT
by jackfromeast, Takahiro Yokoyama · rubypoc
https://github.com/rapid7/metasploit-framework/blob/master/modules/exploits/linux/http/invokeai_rce_cve_2024_12029.rb

This Metasploit module exploits a deserialization vulnerability in InvokeAI's /api/v2/models/install endpoint, allowing remote code execution by serving a malicious model file that executes arbitrary commands upon loading via torch.load.

Classification
Working Poc 95%
Attack Type
Rce
Complexity
Moderate
Reliability
Reliable
Target: InvokeAI versions 4.0.0 to 5.4.2
No auth needed
Prerequisites: Network access to the target's API endpoint · Target running a vulnerable version of InvokeAI
devstral-2 · analyzed Feb 16, 2026 Full analysis →

Scores

CVSS v3 9.8
EPSS 0.0498
EPSS Percentile 91.1%
Attack Vector NETWORK
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CISA SSVC

Vulnrichment
Exploitation poc
Automatable yes
Technical Impact total

Details

CWE
CWE-502
Status published
Products (2)
invoke-ai/invoke-ai/invokeai unspecified - 5.4.3
pypi/InvokeAI 5.3.1 - 5.4.3rc2PyPI
Published Mar 20, 2025
Tracked Since Feb 18, 2026