CVE Catalog

CVE-2026-31232

High
Published: Translated: NVD NIST

Summary

The CosyVoice project contains an insecure deserialization vulnerability in its model loading process. This allows an attacker to execute malicious code on the victim's system by loading a specially crafted model directory.

Risk Assessment

This vulnerability poses a serious risk of remote code execution, potentially leading to full control over the victim's system. Organizations should be aware of the potential data security implications.

Recommendation

It is recommended to implement restrictions on model loading and to use the weights_only=True parameter in the torch.load() function. Additionally, sources of models should be monitored and verified before loading.

Related vulnerabilities

Original NVD description (English source)

The CosyVoice project thru commit 6e01309e01bc93bbeb83bdd996b1182a81aaf11e (2025-30-21) contains an insecure deserialization vulnerability (CWE-502) in its model loading process. When loading model files (.pt) from a user-specified directory (via the --model_dir argument), the code uses torch.load() without the security-restrictive weights_only=True parameter. This allows the deserialization of arbitrary Python objects via the Pickle module. An attacker can exploit this by providing a maliciously crafted model directory containing .pt files with embedded pickle payloads. When a victim loads this directory using CosyVoice's web interface, the malicious payload is executed, leading to remote code execution on the victim's system.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS