CVE-2024-12029CWE-502

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

Critical · published March 20, 2025

CVSS v3.0
9.8
EPSS
6%
Percentile
93.3
In the wild
Unconfirmed
What it is

🔥 Just one unsafe model file can open the door to a full remote code execution! The /api/v2/models/install endpoint in invoke-ai/invokeai versions 5.3.1 through 5.4.2 is vulnerable to nasty exploits. ⚡ Think of it like a restaurant that allows delivery drivers to bring in any dish without checking the ingredients—if an attacker sends in a model file packed with hidden code, it's like serving a poisoned meal right to your patrons' tables! This vulnerability could have absolutely devastating consequences. An attacker could execute any code they want on your server, stealing data, disrupting services, or even deploying further malicious payloads. The thought of having your system compromised is enough to send shivers down your spine!

Put simply

Think of it like a restaurant that allows delivery drivers to bring in any dish without checking the ingredients—if an attacker sends in a model file packed with hidden code, it's like serving a poisoned meal right to your patrons' tables! This remote code execution vulnerability stems from unsafe deserialization of model files via the torch.load function without proper validation, allowing attackers to run arbitrary code upon loading a malicious model file.

What to do

This vulnerability could have absolutely devastating consequences. An attacker could execute any code they want on your server, stealing data, disrupting services, or even deploying further malicious payloads. The thought of having your system compromised is enough to send shivers down your spine! Immediately upgrade to invoke-ai/invokeai version 5.4.3 to patch this vulnerability. Additionally, review and validate model files carefully before they are loaded to protect against embedding malicious code in the future. You've got this! Follow these steps, and you'll have your systems secured in no time. 🛡️

The record
Technical detail
CVSS v3.0
9.8 · CRITICAL
Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
CVSS v4.0
Not supplied
EPSS
0.05983 · 93.3th percentile
Weakness
CWE-502 · Deserialization of Untrusted Data
Published
2025-03-20T10:08Z
EPSS history
Timeline
  • 20 MAR 10:08Z
    Remote Code Execution via Model Deserialization in invoke-ai/invokeai
    cvelistv5