External risk intelligence

GPT-SoVITS Unsafe Deserialization via API Allows Arbitrary Code Execution

CVE advisorySeverity: CRITICAL (CVSS 9.2)

CVE-2026-140281

The vulnerability exists in an API endpoint (api.py /set_model) within a service frequently deployed as a web application. While usage varies, such machine learning inference tools are commonly exposed as web services or APIs to allow remote interaction, making it likely that this interface is reachable over a network in many standard deployment configurations.

Deserialization

Halo Surface Signal: 4 out of 5 — likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

This advisory details a critical vulnerability in GPT-SoVITS, a technology used for AI model checkpoint loading. The flaw allows unauthenticated attackers to execute arbitrary code on the server by loading a malicious model file. This could lead to a compromise of the server's operating environment.

  • Malicious code can run via model loading.
  • Critical flaw impacts server integrity.
  • Confirm relevance and review exposure.

Attack Path

How an attacker could exploit the issue

An attacker can exploit this vulnerability by sending a specially crafted request to the `/set_model` endpoint. This request would include a path pointing to a malicious pickle file that the server can read. When the server attempts to load this file using `torch.load` with specific parameters, it can lead to arbitrary code execution.

  • Network access required, no authentication.
  • Server loads malicious pickle file via API.
  • Arbitrary code execution as server user.

Live Threat

Current exploitation, exposure, and threat context

When supported by the advisory, an unsafe deserialization vulnerability in the `api.py` endpoint could allow unauthenticated attackers to execute arbitrary code on the server. This could occur when an attacker crafts a pickle file and directs the server to load it, leading to the execution of code with the privileges of the server process.

  • Server process user could be compromised.
  • Arbitrary model checkpoints could be loaded.
  • Server code execution may occur.

Operational Fix

Recommended remediation, mitigation, and detection steps

Determine which teams manage the GPT-SoVITS deployment and assess its exposure. The first practical step is to locate all instances of the affected technology, confirm their accessibility and business criticality, identify the accountable owners, and then plan remediation based on risk.

  • Identify application or platform owners.
  • Verify external accessibility and criticality.
  • Plan vendor-assisted remediation efforts.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is GPT-SoVITS?

GPT-SoVITS is an open-source framework used for text-to-speech synthesis and voice conversion. Developers and researchers use it to train and load custom machine learning model checkpoints. Because it provides an API for remote interaction, it is often deployed as a web service that allows external applications or users to trigger these AI audio generation tasks dynamically.

How does CVE-2026-140281 work?

This vulnerability is an unsafe deserialization flaw, categorized as CWE-502. It occurs when the software processes untrusted data without sufficient validation. Specifically, the API endpoint blindly trusts and loads model files using a method that allows embedded instructions to run. Because the software uses a configuration that permits code execution during the loading process, an attacker can use a crafted file to take control of the server.

What triggers this vulnerability?

An attacker must send a request to the /set_model API endpoint specifying a malicious file path. The vulnerability is triggered when the application processes this path and attempts to load the file. Simply hosting the software or having the API available does not trigger the bug; the system must be instructed to load a malicious model checkpoint through that specific endpoint for the code execution to occur.

Is my GPT-SoVITS instance at risk?

According to Halo Surface Signal, this software is frequently deployed as a web service, making the /set_model endpoint reachable over a network. If your instance is exposed to the internet or accessible to untrusted users, it is at higher risk. You should prioritize checking any deployment where the API interface is not restricted behind a secure gateway or internal-only network access.

How should I respond to this threat?

Start by identifying all servers running GPT-SoVITS within your environment and mapping who manages them. Once located, verify if the /set_model endpoint is reachable by unauthorized parties. Work with your application owners to restrict network access to the API immediately while you evaluate available updates or configuration changes to mitigate the risk of arbitrary code execution.

References