MODULE

InvokeAI RCE

Try Surface Command Get a continuous 360° view of your attack surface
Back to Search

InvokeAI RCE

Disclosed
02/07/2025
Created
02/18/2025

Description

InvokeAI has a critical vulnerability leading to remote code execution in the /api/v2/models/install API through unsafe model deserialization. The API allows users to specify a model URL, which is downloaded and loaded server-side using torch.load without proper validation. This functionality allows attackers to embed malicious code in model files that execute upon loading.

Author(s)

  • jackfromeast
  • Takahiro Yokoyama

Platform

Linux

Development

Module Options

To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':

msf > use exploit/linux/http/invokeai_rce_cve_2024_12029
msf exploit(invokeai_rce_cve_2024_12029) > show targets
    ...targets...
msf exploit(invokeai_rce_cve_2024_12029) > set TARGET < target-id >
msf exploit(invokeai_rce_cve_2024_12029) > show options
    ...show and set options...
msf exploit(invokeai_rce_cve_2024_12029) > exploit

Time is precious, so I don’t want to do something manually that I can automate. Leveraging the Metasploit Framework when automating any task keeps us from having to re-create the wheel as we can use the existing libraries and focus our efforts where it matters.

– Jim O’Gorman | President, Offensive Security

;