Executive brief
CosyVoice, a multi-lingual voice generation framework, is vulnerable to a security flaw in how it loads AI model files. If a user is tricked into loading a malicious model file from an untrusted source, an attacker can execute unauthorized commands on the user's computer. This could lead to a full system compromise, data theft, or the installation of malware.
Technical details
CosyVoice (up to commit 6e01309e01bc93bbeb83bdd996b1182a81aaf11e) is vulnerable to insecure deserialization (CWE-502) within its model loading component. The application utilizes the `torch.load()` function to process model weight files (such as llm.pt, flow.pt, and hift.pt) without setting the `weights_only=True` parameter. Because `torch.load` uses the Python pickle module by default, it can be coerced into deserializing arbitrary Python objects. An attacker can exploit this by providing a malicious model directory; when a victim points the CosyVoice Web UI to this directory, the framework executes arbitrary code embedded in the model files.
Affected products
- FunAudioLLM CosyVoice up to commit 6e01309e01bc93bbeb83bdd996b1182a81aaf11e
Timeline
- 2026-05-11: advisory: CVE-2026-31252 published by NVD